Drafts

Update a draft

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

patch/v1/inboxes/{id}/drafts/{did}

Request

  • Base URL: https://anjal.app
  • URL: https://anjal.app/v1/inboxes/{id}/drafts/{did}
  • Auth: API key in header X-API-Key

Request body

subjectstring
plainBodystring
htmlBodystring
replyToMessageIdstring uuid
sendAtstring date-time nullable

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.

Example request

{
  "sendAt": "2026-10-01T09:00:00-04:00"
}

Response

Updated

idstring uuid
inboxIdstring uuid
tostring[]
ccstring[]
bccstring[]
subjectstring
plainBodystring nullable
htmlBodystring nullable
replyToMessageIdstring uuid nullable
labelsstring[]

Applied to the message when the draft is sent.

sendAtstring date-time nullable

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

sendErrorstring nullable

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

createdAtstring date-time
updatedAtstring date-time
updatedboolean

Changes

No recorded changes to this operation across all 1 revision of this API.