Skip to main content
Threads represent email conversations. Each thread contains one or more messages that are part of the same conversation.

List Threads

curl https://api.sendook.com/v1/inboxes/inbox_123/threads \
  -H "Authorization: Bearer YOUR_API_KEY"
Retrieve all threads in an inbox.

Path Parameters

inboxId
string
required
The unique identifier of the inbox.

Response

Returns an array of thread objects.
id
string
Unique identifier for the thread.
organizationId
string
ID of the organization that owns this thread.
inboxId
string
ID of the inbox this thread belongs to.
messages
string[]
Array of message IDs in this thread, in chronological order.
createdAt
string
ISO 8601 timestamp of when the thread was created.
updatedAt
string
ISO 8601 timestamp of when the thread was last updated.

Error Responses

404 Not Found
  • "Inbox not found" - The inbox doesn’t exist or doesn’t belong to your organization

Get Thread

curl https://api.sendook.com/v1/inboxes/inbox_123/threads/thread_456 \
  -H "Authorization: Bearer YOUR_API_KEY"
Retrieve a specific thread by its ID.

Path Parameters

inboxId
string
required
The unique identifier of the inbox.
threadId
string
required
The unique identifier of the thread to retrieve.

Response

id
string
Unique identifier for the thread.
organizationId
string
ID of the organization that owns this thread.
inboxId
string
ID of the inbox this thread belongs to.
messages
string[]
Array of message IDs in this thread, in chronological order.Use the Get Message endpoint to retrieve the full details of each message.
createdAt
string
ISO 8601 timestamp of when the thread was created.
updatedAt
string
ISO 8601 timestamp of when the thread was last updated.

Error Responses

404 Not Found
  • "Thread not found" - The thread doesn’t exist or doesn’t belong to your organization, or doesn’t belong to the specified inbox

Working with Threads

Threads are automatically created when you send a message using the Send Message endpoint. When you reply to a message using the Reply to Message endpoint, the reply is automatically added to the same thread.

Thread Lifecycle

  1. Creation: A thread is created automatically when you send a new message
  2. Growth: Additional messages are added to the thread when:
    • You reply to a message in the thread
    • You receive a reply from a recipient
  3. Retrieval: Use the List Threads or Get Thread endpoints to view thread information

Best Practices

  • Use threads to group related messages together in your application UI
  • Fetch thread details to show complete conversation history
  • Monitor the messages array to track conversation length
  • Use the updatedAt timestamp to sort threads by recent activity

Build docs developers (and LLMs) love