# Support API

Version 1.0 · OpenAPI 3.1.0

Open support tickets with EvoHub from scripts and tools, follow the
conversation, reply, and read the support audit log of your organization.

**Authentication.** Every endpoint takes an EvoHub API key, sent as
`Authorization: Bearer evohub_…` or as `X-API-Key: evohub_…`. A missing or
invalid key gets **401**; a valid key without the scope an endpoint needs
gets **403**, never 401. See the [API overview](/api-overview),
[API keys and scopes](/api-keys-and-scopes) and [Errors](/errors).

**Whose tickets.** Tickets are private to whoever opened them. The ticket
endpoints need no scope, because they only ever reach the caller's own
tickets:

- a **personal key** acts as the person who created it, so it sees and
  replies to that person's tickets, including the ones they opened in the
  console;
- an **organization key** acts as itself, so it sees only the tickets
  opened with that key.

A ticket that belongs to someone else in the organization answers **404**
`NOT_FOUND`, exactly like one that does not exist. The organization-wide
audit log is the one endpoint that reaches beyond the caller's own
tickets, and it needs the `support:audit:read` scope.

**Responses.** Success is `{"success": true, "data": …}`. Errors are
`{"success": false, "error": {"code", "message", "request_id"}}`;
`request_id` is the request's id, also sent in the `X-Request-ID` header —
quote it to support. A refusal from the API gateway itself (401, 429)
carries the same `error` object without `success`. Timestamps are
RFC 3339 in UTC. Ids carry a type prefix (`tkt_`, `msg_`, `aud_`).

## Servers

- `https://evohub.io`

## Authentication

- `bearerKey`: HTTP Bearer — An EvoHub API key (`evohub_…`) as a bearer token.
- `headerKey`: API key in the header `X-API-Key` — An EvoHub API key (`evohub_…`).

## Tickets

Open tickets, read the conversation and reply.

- [GET /api/v1/support/tickets](https://docs.evohub.io/support/list-tickets.md): List your tickets
- [POST /api/v1/support/tickets](https://docs.evohub.io/support/create-ticket.md): Open a ticket
- [GET /api/v1/support/tickets/{id}](https://docs.evohub.io/support/get-ticket.md): Read a ticket and its conversation
- [POST /api/v1/support/tickets/{id}/messages](https://docs.evohub.io/support/reply-to-ticket.md): Reply to a ticket

## Audit log

What happened to tickets, and who did it.

- [GET /api/v1/support/tickets/{id}/audit-logs](https://docs.evohub.io/support/list-ticket-audit-logs.md): List a ticket's audit log
- [GET /api/v1/support/audit-logs](https://docs.evohub.io/support/list-support-audit-logs.md): List the organization's support audit log
