Aller au contenu

API console: support

Cette page est générée à partir de server/api/openapi.yaml. Son contenu est en anglais ; ne la modifiez pas à la main.

Announcements and support tickets of the active organisation (V3 R6). Handlers: internal/console/support.

Announcements for me in the active organisation

operationId supportListAnnouncements · auth: orgSession

Published announcements whose window contains now and that target every trust tier or the active organisation’s tier, newest first (at most 100), with my read marks. Titles and bodies are plain text in both languages (either may be empty); clients escape them and pick the reader’s language, falling back to the other.

Status Meaning Body
200 OK application/json AnnouncementList
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — AnnouncementList

  • data (array of Announcement, required)
    • id (string, required)
    • title_en (string, required)
    • title_zh (string, required)
    • body_en (string, required)
    • body_zh (string, required)
    • severity (AnnouncementSeverity, required)
    • starts_at (string, required)
    • ends_at (string, required, nullable)
    • read_at (string, required, nullable) — When I marked it read; null = unread.
  • unread (integer, required)

Mark every visible announcement read

operationId supportMarkAllAnnouncementsRead · auth: orgSession

Status Meaning Body
200 OK application/json AnnouncementsMarked
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — AnnouncementsMarked

  • marked (integer, required) — Read marks added.

Mark one announcement read

operationId supportMarkAnnouncementRead · auth: orgSession

Idempotent. 404 announcement_not_found when it is not visible to me.

Parameter In Type Required Description
announcement_id path string<uuid> yes
Status Meaning Body
204 Marked. —
default Error envelope. The HTTP status follows the error kind. application/json Error

Support tickets of the active organisation

operationId supportListTickets · auth: orgSession

The tickets I opened in the active organisation; owners and admins see every ticket of the organisation. Newest first.

Parameter In Type Required Description
status query TicketStatusFilter no
cursor query string no Opaque cursor from a previous page’s next_cursor.
limit query integer<int32> no (minimum: 1, maximum: 200, default: 50)
Status Meaning Body
200 OK application/json TicketPage
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — TicketPage

  • data (array of Ticket, required)
    • id (string, required)
    • number (integer, required)
    • ref (string, required) — Human reference, e.g. “T1042”.
    • subject (string, required)
    • category (TicketCategory, required)
    • status (TicketStatus, required) — open = waiting for support; answered = support replied, waiting for you; resolved = solved (a reply reopens it); closed = final.
    • created_by (string, required) — The member who opened it.
    • message_count (integer, required)
    • last_message_at (string, required)
    • last_actor (“customer” | “operator”, required)
    • created_at (string, required)
    • updated_at (string, required)
    • resolved_at (string, required, nullable)
    • closed_at (string, required, nullable)
  • next_cursor (string, required, nullable)
  • has_more (boolean, required)

Open a support ticket

operationId supportCreateTicket · auth: orgSession

Opens a ticket in the active organisation with its first message. Plain text only (no HTML, no attachments); the subject is one line of at most 200 characters, a message at most 10,000 characters. Limits: the ticket.create_per_hour setting per user (429 ticket_rate_limited with Retry-After) and ticket.max_open_per_org unresolved tickets per organisation (429 ticket_too_many_open). Operators are notified by email.

Request body (required) application/json — TicketCreateRequest

  • subject (string, required, maxLength: 200)
  • category (TicketCategory, required)
  • body (string, required, maxLength: 10000)
Status Meaning Body
201 Created application/json TicketDetail
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 201 application/json — TicketDetail

  • ticket (Ticket, required)
    • id (string, required)
    • number (integer, required)
    • ref (string, required) — Human reference, e.g. “T1042”.
    • subject (string, required)
    • category (TicketCategory, required)
    • status (TicketStatus, required) — open = waiting for support; answered = support replied, waiting for you; resolved = solved (a reply reopens it); closed = final.
    • created_by (string, required) — The member who opened it.
    • message_count (integer, required)
    • last_message_at (string, required)
    • last_actor (“customer” | “operator”, required)
    • created_at (string, required)
    • updated_at (string, required)
    • resolved_at (string, required, nullable)
    • closed_at (string, required, nullable)
  • messages (array of TicketMessage, required) — Oldest first.
    • id (string, required)
    • author_role (“customer” | “operator”, required)
    • author_id (string, required, nullable) — The member who wrote it; null for support replies on the customer side.
    • internal (boolean, required) — An operator note (admin API only; always false for customers).
    • body (string, required) — Plain text; render escaped, keep line breaks.
    • created_at (string, required)

One ticket with its conversation

operationId supportGetTicket · auth: orgSession

404 ticket_not_found for a ticket of another organisation or, for members without org-wide access, of another member.

Parameter In Type Required Description
ticket_id path string<uuid> yes
Status Meaning Body
200 OK application/json TicketDetail
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — TicketDetail

  • ticket (Ticket, required)
    • id (string, required)
    • number (integer, required)
    • ref (string, required) — Human reference, e.g. “T1042”.
    • subject (string, required)
    • category (TicketCategory, required)
    • status (TicketStatus, required) — open = waiting for support; answered = support replied, waiting for you; resolved = solved (a reply reopens it); closed = final.
    • created_by (string, required) — The member who opened it.
    • message_count (integer, required)
    • last_message_at (string, required)
    • last_actor (“customer” | “operator”, required)
    • created_at (string, required)
    • updated_at (string, required)
    • resolved_at (string, required, nullable)
    • closed_at (string, required, nullable)
  • messages (array of TicketMessage, required) — Oldest first.
    • id (string, required)
    • author_role (“customer” | “operator”, required)
    • author_id (string, required, nullable) — The member who wrote it; null for support replies on the customer side.
    • internal (boolean, required) — An operator note (admin API only; always false for customers).
    • body (string, required) — Plain text; render escaped, keep line breaks.
    • created_at (string, required)

Reply to a ticket

operationId supportReplyTicket · auth: orgSession

Reopens a resolved ticket (status open). 422 ticket_closed on a closed ticket; 429 ticket_rate_limited past the ticket.messages_per_hour setting.

Parameter In Type Required Description
ticket_id path string<uuid> yes

Request body (required) application/json — TicketReplyRequest

  • body (string, required, maxLength: 10000)
Status Meaning Body
201 Created application/json TicketDetail
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 201 application/json — TicketDetail

  • ticket (Ticket, required)
    • id (string, required)
    • number (integer, required)
    • ref (string, required) — Human reference, e.g. “T1042”.
    • subject (string, required)
    • category (TicketCategory, required)
    • status (TicketStatus, required) — open = waiting for support; answered = support replied, waiting for you; resolved = solved (a reply reopens it); closed = final.
    • created_by (string, required) — The member who opened it.
    • message_count (integer, required)
    • last_message_at (string, required)
    • last_actor (“customer” | “operator”, required)
    • created_at (string, required)
    • updated_at (string, required)
    • resolved_at (string, required, nullable)
    • closed_at (string, required, nullable)
  • messages (array of TicketMessage, required) — Oldest first.
    • id (string, required)
    • author_role (“customer” | “operator”, required)
    • author_id (string, required, nullable) — The member who wrote it; null for support replies on the customer side.
    • internal (boolean, required) — An operator note (admin API only; always false for customers).
    • body (string, required) — Plain text; render escaped, keep line breaks.
    • created_at (string, required)

Mark a ticket resolved

operationId supportResolveTicket · auth: orgSession

Idempotent on a resolved ticket; 422 ticket_closed on a closed one.

Parameter In Type Required Description
ticket_id path string<uuid> yes
Status Meaning Body
200 OK application/json Ticket
default Error envelope. The HTTP status follows the error kind. application/json Error

Response 200 application/json — Ticket

  • id (string, required)
  • number (integer, required)
  • ref (string, required) — Human reference, e.g. “T1042”.
  • subject (string, required)
  • category (TicketCategory, required)
  • status (TicketStatus, required) — open = waiting for support; answered = support replied, waiting for you; resolved = solved (a reply reopens it); closed = final.
  • created_by (string, required) — The member who opened it.
  • message_count (integer, required)
  • last_message_at (string, required)
  • last_actor (“customer” | “operator”, required)
  • created_at (string, required)
  • updated_at (string, required)
  • resolved_at (string, required, nullable)
  • closed_at (string, required, nullable)