All endpoints

Create a draft

POSThttps://anjal.app/v1/inboxes/{id}/drafts

labels are applied to the message when the draft is sent. Set sendAt to schedule the send: Anjal sends it at that time, no cron needed.

Path parameters

id
required
string

Inbox UUID

Request body

Content-Type: application/json

to
string | string[]
cc
string | string[]
bcc
string | string[]
subject
string
plainBody
string
htmlBody
string
replyToMessageId
string

format: uuid

labels
string[] | string

Labels as an array or a comma-separated string. Stored lowercase and deduplicated; at most 32 labels of at most 64 characters, no commas.

sendAt
string

Schedule the send: ISO 8601 with an offset, e.g. `2026-10-01T09:00:00-04:00`. Must be in the future and at most 90 days ahead. A scheduled draft needs at least one recipient and a body. On update, `null` cancels the schedule. Anjal checks for due drafts about every 20 seconds. If the send fails, the draft is kept, `sendError` is set, `sendAt` is cleared and `draft.send_failed` fires.

format: date-time

Responses

201application/jsonCreated
id
string

format: uuid

inboxId
string

format: uuid

to
string[]
cc
string[]
bcc
string[]
subject
string
plainBody
string
htmlBody
string
replyToMessageId
string

format: uuid

labels
string[]

Applied to the message when the draft is sent.

sendAt
string

When Anjal will send this draft. Null if not scheduled.

format: date-time

sendError
string

Why the last scheduled send failed. The draft is kept and `sendAt` is cleared.

createdAt
string

format: date-time

updatedAt
string

format: date-time

400Validation error, e.g. sendAt in the past, more than 90 days ahead, or a scheduled draft without recipients or a body

Authentication

Send your API key in the X-API-Key header (or Authorization: Bearer <key>). Any prefix accepted by this endpoint — tk_, wk_, ak_, or sa_ — is documented in the key prefix table.