/v1/workspaces/{workspace_id}/threads/{id}/labelsAuthLabel a conversation
Adds labels to the thread (ones it has already are kept). Needs `mail.thread.triage` on its mailbox.
Path parameters
workspace_id*string · uuidId of the workspace.
id*string · uuidThread id.
Headers
Idempotency-KeystringOpaque client-generated string (1–256 chars, `[A-Za-z0-9._:-]`) used to deduplicate retries within a 24h window. A retry with the same key and body returns the original response with `Idempotent-Replay: true`.
Request body
label_ids*arrayLabel ids to add (already present ones are kept).
Response · 200
id*string · uuidThread id (`GET /threads/{id}`).
mailbox*objectThe mailbox the conversation belongs to.
subject*stringSubject of the first message.
snippet*stringStart of the newest received message's text. Null without `mail.message.body.read`, or for a thread with sent mail only.
participants*arrayEveryone who wrote or was written to, the mailbox itself excluded.
message_count*numberReceived messages plus sent emails.
Example: 3
unread_count*numberReceived messages not read yet.
Example: 1
has_attachments*booleanAny message in it has files.
assignee_account_id*string · uuidThe workspace member it is assigned to.
labels*arrayIts labels, by name.
status*objectNew mail on an `archived` thread moves it back to `open`.
last_message_at*string · date-timeNewest message, received or sent.
trashed_at*string · date-timeWhen it was moved to the trash; it is erased 30 days later. Null outside the trash.
has_pending_draft*booleanA draft in this conversation is waiting for approval (`GET /drafts?thread_id=…&status=pending_approval`).
Example: false
Example
Request
POST https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/threads/{id}/labels
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"label_ids": [
"00000000-0000-0000-0000-000000000000"
]
}Response
{
"id": "00000000-0000-0000-0000-000000000000",
"mailbox": {},
"subject": "string",
"snippet": "string",
"participants": [
"string"
],
"message_count": 3,
"unread_count": 1,
"has_attachments": false,
"assignee_account_id": "00000000-0000-0000-0000-000000000000",
"labels": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "Needs reply",
"color": "#e5484d"
}
],
"status": {},
"last_message_at": "2026-01-01T00:00:00.000Z",
"trashed_at": "2026-01-01T00:00:00.000Z",
"has_pending_draft": false
}