support
POST /v1/tickets/{ticketId}/messages/{messageId}/attachments
Attach a file to a ticket message.
Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění tickets.reply; klíč bez něj je odmítnut s kódem 403, nikoli 404.
Tento koncový bod nevyžaduje žádné ID organizace. Váš klíč již identifikuje organizaci, ke které patří, a odpověď je na ni omezena.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
curl -X POST https://api.zinndigital.com/v1/tickets/{ticketId}/messages/{messageId}/attachments \
-H "Authorization: Bearer zdk_live_…"Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
Uploads one file and records it against the message. The file is accepted immediately and is **not downloadable by anyone — including staff — until a malware scan has passed** (`scan_state: clean`). ⛔ Only the types on the allow-list are accepted, and the declared content type is verified against the file's own leading bytes: a `.png` beginning `MZ` is refused whatever the header says. Maximum 25 MB. Requires `tickets.reply`.
Parametry
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
ticketId (path) | Uuid | Ano | The ticket's id. |
messageId (path) | Uuid | Ano | The message the file belongs to. |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
id | Uuid | Ano | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
filename | string | Ano | The name the uploader's machine gave it. ⛔ Display only — it is attacker-controlled text and is never used to build a storage path. |
content_type | string | Ano | — |
size_bytes | integer | Ano | — |
scan_state | string<pending, clean, infected, error> | Ano | `pending` — uploaded, not yet scanned. `clean` — the only servable state. `infected` — the scanner found something; the row survives as evidence and the bytes never leave. `erro… |
downloadable | boolean | Ano | Whether these bytes may be served. True only for `clean`. |
Chyby, které může tento koncový bod vrátit
401 · 403 · 404 · 422 · 429