Skip to main content
PATCH
/
api
/
threads
/
[id]
Update Thread
curl --request PATCH \
  --url 'https://api.example.com/api/threads/[id]' \
  --header 'Content-Type: application/json' \
  --data '
{
  "status": "<string>",
  "isRead": true,
  "categoryId": "<string>",
  "detectedLanguage": "<string>"
}
'
{
  "ok": true
}
Updates metadata for a specific email thread. Allows modifying status, read state, category, and detected language.

Authentication

Requires active session. User must be authenticated. Permission Level: Any authenticated user (view, edit, send, or admin)

Path Parameters

id
string
required
The unique identifier of the thread to update

Request Body

All fields are optional. Only include fields you want to update.
status
string
Thread status. Must be one of: inbox, sent, or archived
isRead
boolean
Mark the thread as read (true) or unread (false)
categoryId
string
Assign the thread to a category. Must be a valid category ID or empty string to remove category assignment.
detectedLanguage
string
Set the detected language code (e.g., en, ko, es, fr)

Response

Returns a success confirmation.
ok
boolean
Always true when the update succeeds

Error Responses

Status 401: User is not authenticated Status 404: Thread not found (no error object returned, but the update will silently succeed with 0 rows affected)

Examples

curl -X PATCH 'https://app.delightbridge.com/api/threads/thread_abc123' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: session=...' \
  -d '{
    "isRead": true
  }'

Response Example

{
  "ok": true
}

Notes

  • The endpoint accepts partial updates. You only need to include the fields you want to change.
  • If you send an empty object {}, the endpoint will still return success but won’t modify any data.
  • Invalid status or categoryId values will cause a database constraint error.
  • The categoryId field can be set to an empty string to remove category assignment.

Build docs developers (and LLMs) love