All endpoints

Update a draft

PATCHhttps://anjal.app/v1/inboxes/{id}/drafts/{did}

Merge-patch. Omitted fields are left as-is. Set sendAt to schedule or reschedule the send (this also clears sendError); sendAt: null cancels it.

Path parameters

id
required
string

Inbox UUID

did
required
string

Draft 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

200application/jsonUpdated
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

updated
boolean
400application/jsonRequest body failed schema validation
error
required
string
code
string

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.