Skip to main content
GET
/
api
/
threads
/
[id]
Get Thread
curl --request GET \
  --url 'https://api.example.com/api/threads/[id]'
{
  "id": "<string>",
  "serviceId": "<string>",
  "subject": "<string>",
  "customerEmail": "<string>",
  "customerName": "<string>",
  "categoryId": "<string>",
  "status": "<string>",
  "detectedLanguage": "<string>",
  "isRead": true,
  "lastMessageAt": "<string>",
  "draft": "<string>",
  "draftSubject": "<string>",
  "draftAttachments": [
    {}
  ],
  "translation": "<string>",
  "lastMessagePreview": "<string>",
  "messageCount": 123,
  "messages": [
    {
      "id": "<string>",
      "fromEmail": "<string>",
      "fromName": "<string>",
      "toEmail": "<string>",
      "body": "<string>",
      "direction": "<string>",
      "timestamp": "<string>",
      "attachments": [
        {}
      ]
    }
  ],
  "error": "<string>"
}
Retrieves detailed information about a specific email thread, including all messages in the conversation.

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 retrieve

Response

Returns a single thread object with complete message history.
id
string
Unique thread identifier
serviceId
string
ID of the service account this thread belongs to
subject
string
Email thread subject line
customerEmail
string
Email address of the customer/sender
customerName
string
Display name of the customer/sender
categoryId
string
ID of the category assigned to this thread (empty string if none)
status
string
Thread status: inbox, sent, or archived
detectedLanguage
string
ISO language code detected from the thread content (e.g., en, ko)
isRead
boolean
Whether the thread has been marked as read
lastMessageAt
string
ISO 8601 timestamp of the most recent message in the thread
draft
string
HTML content of the draft reply (empty string if no draft exists)
draftSubject
string
Subject line for the draft (defaults to Re: {subject})
draftAttachments
array
Array of draft attachments (currently always empty)
translation
string
Translated version of the draft content (empty if no translation)
lastMessagePreview
string
Plain text preview of the most recent message with HTML stripped
messageCount
number
Total number of messages in the thread
messages
array
Array of all messages in the thread, ordered by sentAt ascending

Error Responses

error
string
Error message describing what went wrong
Status 404: Thread not found
{
  "error": "thread not found"
}
Status 401: User is not authenticated

Examples

curl -X GET 'https://app.delightbridge.com/api/threads/thread_abc123' \
  -H 'Cookie: session=...'

Response Example

{
  "id": "thread_abc123",
  "serviceId": "service_123",
  "subject": "Question about order #5678",
  "customerEmail": "[email protected]",
  "customerName": "Jane Smith",
  "categoryId": "cat_support",
  "status": "inbox",
  "detectedLanguage": "en",
  "isRead": false,
  "lastMessageAt": "2026-03-01T10:30:00.000Z",
  "draft": "<p>Thank you for reaching out. We're looking into this.</p>",
  "draftSubject": "Re: Question about order #5678",
  "draftAttachments": [],
  "translation": "",
  "lastMessagePreview": "I have a question about my recent order...",
  "messageCount": 2,
  "messages": [
    {
      "id": "msg_001",
      "fromEmail": "[email protected]",
      "fromName": "Jane Smith",
      "toEmail": "[email protected]",
      "body": "<p>I have a question about my recent order #5678...</p>",
      "direction": "inbound",
      "timestamp": "2026-03-01T10:00:00.000Z",
      "attachments": []
    },
    {
      "id": "msg_002",
      "fromEmail": "[email protected]",
      "fromName": "Support Team",
      "toEmail": "[email protected]",
      "body": "<p>Thank you for reaching out. We're looking into this.</p>",
      "direction": "outbound",
      "timestamp": "2026-03-01T10:30:00.000Z",
      "attachments": []
    }
  ]
}

Build docs developers (and LLMs) love