All endpoints

Send a draft

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

Sends the current draft contents now and deletes the draft atomically. If the draft has replyToMessageId, the sent message is threaded as a reply. The draft's labels are applied to the sent message. Accepts an Idempotency-Key header.

Path parameters

id
required
string

Inbox UUID

did
required
string

Draft UUID

Header parameters

Idempotency-Key
string

Unique value for this send (e.g. a UUID). A retry with the same key and identical request returns the stored response (header `Idempotent-Replayed: true`) and sends nothing. Same key with a different request: 409 `IDEMPOTENCY_KEY_REUSED`. Same key while the first is still running: 409 `IDEMPOTENCY_IN_PROGRESS`. Blank: 400 `IDEMPOTENCY_KEY_INVALID`. Keys are per account and expire after 24 hours; a failed send (non-2xx) frees the key.

Responses

200application/jsonSent
id
string

format: uuid

threadId
string

format: uuid

status
string
messageId
string
draftId
string

format: uuid

400Validation error, or IDEMPOTENCY_KEY_INVALID
409application/json`IDEMPOTENCY_KEY_REUSED` (the key was used for a different request) or `IDEMPOTENCY_IN_PROGRESS` (the first request with this key is still running).
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.