support
POST /v1/tickets/{ticketId}/messages/{messageId}/attachments
Attach a file to a ticket message.
Pengesahan
Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran tickets.reply; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.
Titik akhir ini tidak memerlukan id organisasi. Kunci anda telah mengenal pasti organisasi kepunyaannya, dan respons dis skopkan kepadanya.
Cuba
Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.
curl -X POST https://api.zinndigital.com/v1/tickets/{ticketId}/messages/{messageId}/attachments \
-H "Authorization: Bearer zdk_live_…"Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API
Butiran
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`.
Parameter
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
ticketId (path) | Uuid | Ya | The ticket's id. |
messageId (path) | Uuid | Ya | The message the file belongs to. |
Respons
| Nama | Jenis | Diperlukan | Apakah ia |
|---|---|---|---|
id | Uuid | Ya | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
filename | string | Ya | 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 | Ya | — |
size_bytes | integer | Ya | — |
scan_state | string<pending, clean, infected, error> | Ya | `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 | Ya | Whether these bytes may be served. True only for `clean`. |
Ralat yang boleh dikembalikan oleh titik akhir ini
401 · 403 · 404 · 422 · 429