All endpoints

Send a message

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

Sends from this inbox. The From header is derived from the inbox's primary alias. Pass verified: true when you've validated the recipient domain out-of-band (e.g. via verify-email); otherwise, sends to an address that has never replied to this inbox are rejected as a deliverability safeguard.

Pass an Idempotency-Key header so a retry never sends twice. labels tags the sent message; trackOpens: true adds an open-tracking pixel to the HTML body. The message.sent webhook payload includes labels.

Path parameters

id
required
string

Inbox 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.

Request body

Content-Type: application/json

to
required
string | string[]
cc
string | string[]

Cc recipient(s) — subject to the same MX + verified + abuse gates as `to`.

bcc
string | string[]

Bcc recipient(s).

subject
required
string
plainBody
string
htmlBody
string
replyTo
string

format: email

verified
boolean

default: false

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.

trackOpens
boolean

Add an open-tracking pixel (HTML body only). See `SendExtras`.

default: false

Responses

200application/jsonSent
id
string

format: uuid

threadId
string

format: uuid

status
string
messageId
string
400Validation error, or IDEMPOTENCY_KEY_INVALID
403Inbox paused or plan limit reached
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
502SMTP relay error

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.