Documentation

Learn TicketsX faster

Setup guides, the full command reference, Premium features, and the REST API in one place.

Get Transcript HTML

GET/<guild_id>/api/transcripts/<ticket_id>/html

Download the complete stored HTML transcript of a closed ticket — the exact archive the dashboard renders, with every message, embed, attachment link, and avatar. Requires the `view_transcript_html` permission (off by default).

Query Parameters

NameTypeRequiredDescription
formatstringoptionalSet to raw to receive the HTML file itself with Content-Type: text/html, ready to write to disk or drop into an iframe. Omit for the default JSON envelope with the transcript metadata alongside the HTML. Errors are always returned as JSON.

This is the most sensitive read the API offers, so it is limited to 10 requests per minute per token and every call is written to your server’s activity log. Transcripts are stored encrypted and decrypted per request. Very large archives are refused with 413 and the response includes the transcript_url to view instead.

Example request — JSON envelope
curl -X GET \
  -H "Authorization: Bearer <API_TOKEN>" \
  "https://api.ticketsx.xyz/<guild_id>/api/transcripts/<ticket_id>/html"
Example request — save the file directly
curl -X GET \
  -H "Authorization: Bearer <API_TOKEN>" \
  -o ticket_42.html \
  "https://api.ticketsx.xyz/<guild_id>/api/transcripts/<ticket_id>/html?format=raw"
Example response (default JSON)
{
  "transcript": {
    "TicketId": 42,
    "PanelId": 1,
    "PanelName": "Support",
    "AuthorId": "123456789",
    "AuthorUsername": "jane",
    "Rating": 5,
    "CloseReason": "Resolved",
    "CreatedAt": 1732200000,
    "ClosedAt": 1732210000,
    "TranscriptUrl": "https://tickets.example.com/<guild_id>/transcripts/42"
  },
  "content_type": "text/html; charset=utf-8",
  "bytes": 184320,
  "html": "<!DOCTYPE html>..."
}