Skip to main content
PATCH
Update Thread
CLI:

Overview

Updates a Unibox thread. Use it to archive or reactivate a thread, update unread count, choose a sender for an email draft, or edit one-off draft fields before sending.

Path Parameters

Request Body

At least one valid field is required.

Example

Duplicate Recipient Handling

When changing account_id on an email thread, the API checks whether that sender already has a non-archived, non-warmup thread with the same participant_email. If one exists, the response is 409 with existing_thread.

AI agent notes

Use this endpoint for draft edits and thread state changes. Do not use it to send a message; call Send message after the draft is ready. The public API cannot upload a new thread attachment. Do not invent storage metadata or call /api/threads/{id}/attachments; that multipart route is UI-only. If a new file must be attached, ask the human to add it in Unibox. Before sending, re-fetch the thread and confirm the recipient, sender, subject, body, and any existing attachment names with the human. Surface 400, 403, 404, and 409 responses without retrying the same update.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Thread (conversations.id) UUID.

Body

application/json
status
enum<string>
Available options:
active,
archived
unread_count
integer
Required range: 0 <= x <= 9007199254740991
account_id
string | null

Email sender account ID, or null when no sender is selected yet.

participant_email
string

Recipient email address.

participant_name
string

Recipient display name.

draft_subject
string | null

Draft email subject.

draft_body_text
string | null

Draft plain-text body.

draft_body_html
string | null

Draft HTML body.

draft_cc
string | null

Draft CC recipients.

draft_bcc
string | null

Draft BCC recipients.

draft_attachments
object[] | null

Dashboard-only attachment metadata. Bearer API-key callers must omit this field and ask a human to manage attachments in Unibox.

Response

Successful response.