Skip to main content

Attachments

📄️Download Support Attachment

Streams a ticket attachment's file. The lookup is scoped to the active tenant: the attachment must belong to one of this account's tickets that the caller can view, and it must sit on a public message — files attached to internal notes, and files no longer attached to any message, are not visible here and return 404 exactly as a non-existent attachment does. The response is the raw file (`Content-Type` matches the attachment's stored media type, `Content-Disposition: attachment` with its original filename) — not JSON.

📄️Download Agent Ticket Attachment

The agent console's path for the same file. It has no tenant context — the attachment is looked up across every account — and it covers every attachment on the ticket, including files on internal notes and files that are no longer attached to a message. Use this route from the console; the customer route only serves public-message files within one account. The response is the raw file (`Content-Type` matches the stored media type, `Content-Disposition: attachment` with the original filename), not JSON.

📄️Inline Support Attachment (signed URL)

Serves a ticket attachment for a **signed, expiring URL** — no bearer token, no session: the signature is the whole authorisation. These URLs are never built by hand; every attachment in a message resource (`GET /api/support/tickets/:ticket/messages`, `GET /api/support/agent/tickets/:ticket/messages`) carries its own as `url` (inline) and `download_url` (download), valid for between 1 and 2 hours. A link stays the same for every read within the hour, so a client can cache the file by its URL. A message that arrived by email also has `html_source: 'email'`, its `body_html` rewritten so each `cid:` image source points at the matching attachment's `url`, and `inline_attachment_ids` listing the attachments shown that way.