Messages encapsulate email content processed by Sendook—text, HTML, participants, and labels. All message routes are scoped to a specific inbox.
POST/v1/inboxes/{inboxId}/messages/send| Parameter | Type | Description |
|---|---|---|
inboxId | string | Inbox that will send the outbound email. |
{
"to": ["recipient@example.com"],
"cc": ["manager@example.com"],
"bcc": [],
"labels": ["outbound", "welcome"],
"subject": "Welcome to Sendook",
"text": "Plain text version of the email.",
"html": "<p>HTML version of the email.</p>",
"attachments": [
{
"content": "base64-encoded-file-content",
"name": "document.pdf",
"contentType": "application/pdf"
}
]
}
| Field | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Primary recipients (must contain at least one email). |
cc | string | No | Carbon copy recipients. |
bcc | string | No | Blind carbon copy recipients. |
labels | string | No | Custom labels applied to the message. |
subject | string | Yes | Message subject line. |
text | string | Yes | Plain-text body. |
html | string | Yes | HTML body. |
attachments | object | No | Array of file attachments. Each attachment must include content (base64-encoded), optional name (filename), and optional contentType (MIME type). |
202 Accepted{
"id": "msg_01J3ZN9SB2M5MHF5C2QBP4DT78",
"subject": "Welcome to Sendook",
"text": "Plain text version of the email.",
"html": "<p>HTML version of the email.</p>",
"labels": ["outbound", "welcome"],
"createdAt": "2024-10-10T19:22:10Z"
// ...delivery metadata may be included
}
202 Accepted indicates the message is queued for delivery; monitor webhooks or threads for delivery outcomes.
POST/v1/inboxes/{inboxId}/messages/{messageId}/reply| Parameter | Type | Description |
|---|---|---|
inboxId | string | Inbox that will send the reply. |
messageId | string | Original message to reply to. |
{
"text": "Thanks for reaching out!",
"html": "<p>Thanks for reaching out!</p>"
}
Both text and html representations are required to ensure accessibility.
202 AcceptedThe payload matches the standard Message schema with the newly created reply.
GET/v1/inboxes/{inboxId}/messages| Parameter | Type | Description |
|---|---|---|
query | string | Optional filter expression to search messages. |
200 OK[
{
"id": "msg_01J3ZN9SB2M5MHF5C2QBP4DT78",
"subject": "Welcome to Sendook",
"text": "Plain text version of the email.",
"html": "<p>HTML version of the email.</p>",
"labels": ["outbound", "welcome"],
"createdAt": "2024-10-10T19:22:10Z"
}
]
GET/v1/inboxes/{inboxId}/messages/{messageId}200 OK{
"id": "msg_01J3ZN9SB2M5MHF5C2QBP4DT78",
"subject": "Welcome to Sendook",
"text": "Plain text version of the email.",
"html": "<p>HTML version of the email.</p>",
"labels": ["outbound", "welcome"],
"createdAt": "2024-10-10T19:22:10Z"
}
The Message schema includes the following core fields (additional metadata may be present):
| Field | Type | Description |
|---|---|---|
id | string | Unique message identifier. |
subject | string | Email subject line. |
text | string | Plain-text content. |
html | string | HTML content. |
labels | string | Custom labels assigned to the message. |
createdAt | string (date-time) | Timestamp when the message was created. |