support
POST /v1/tickets/{ticketId}/messages/{messageId}/attachments
Attach a file to a ticket message.
Аутентификация
Отправьте ключ API в качестве токена носителя (bearer token). Ключ должен иметь разрешение tickets.reply; ключ без него отклоняется с кодом 403, а не 404.
Этот эндпоинт не принимает идентификатор организации. Ваш ключ уже определяет организацию, к которой он принадлежит, и ответ ограничивается ее рамками.
Попробовать
Замените всё в угловых скобках на собственные значения, а плейсхолдер ключа — на ключ из вашей панели управления.
curl -X POST https://api.zinndigital.com/v1/tickets/{ticketId}/messages/{messageId}/attachments \
-H "Authorization: Bearer zdk_live_…"Вошли в систему? Консоль API в вашей панели управления автоматически подставляет реальный идентификатор вашей организации и ваш собственный ключ, а также выполняет запрос к работающему 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