Skip to content

Remove a pending file from a Kai thread

DELETE
/api/support/threads/{id}/files/{attachment_id}/
curl --request DELETE \
--url http://localhost:8000/api/support/threads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/files/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ \
--header 'Authorization: Bearer <token>'

Deletes an uploaded-but-unsent file (a composer chip’s ×) and its stored object. Files already bound to a sent message are conversation history and return 404. Feature-flagged like every thread route (404 while disabled).

attachment_id
required
string format: uuid
id
required
string format: uuid

Pending file removed.

Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string
Examplegenerated
{
"detail": "example"
}
Media typeapplication/json
object
detail
required

429 — rate limit exceeded. Honour the Retry-After response header (seconds to wait) before retrying; it is sent on every 429.

string
Examplegenerated
{
"detail": "example"
}