support
POST /v1/tickets/{ticketId}/messages/{messageId}/attachments
Attach a file to a ticket message.
Նույնականացում
Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա tickets.reply թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:
Այս վերջնակետը կազմակերպության ID չի ընդունում: Ձեր բանալին արդեն իսկ նույնականացնում է այն կազմակերպությունը, որին պատկանում է, և պատասխանը սահմանափակված է դրանով:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
curl -X POST https://api.zinndigital.com/v1/tickets/{ticketId}/messages/{messageId}/attachments \
-H "Authorization: Bearer zdk_live_…"Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը API վահանակում
Մանրամասներ
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`.
Պարամետրեր
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
ticketId (path) | Uuid | Այո | The ticket's id. |
messageId (path) | Uuid | Այո | The message the file belongs to. |
Պատասխան
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
id | Uuid | Այո | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
filename | string | Այո | 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 | Այո | — |
size_bytes | integer | Այո | — |
scan_state | string<pending, clean, infected, error> | Այո | `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 | Այո | Whether these bytes may be served. True only for `clean`. |
Այս վերջնակետի կողմից վերադարձվող սխալները
401 · 403 · 404 · 422 · 429