Capturia measures its ads and site traffic with the Meta pixel and Google Analytics. You can decline at any time. Learn more

FR

Emails

2 endpoints

get/v1/emails/conversations

List email conversations

Returns a paginated list of the account's email threads (cursor v2). Stable sort: last_message_at DESC, id DESC — conversations with a recent exchange come first. last_message_at is NOT NULL in the table.

Read-only

The public API only exposes the list of threads. The individual messages of a conversation aren't available through the public API yet — the payload is limited to the thread's metadata. To send an email, use POST /v1/emails/send.

Required scopes: email:read

Responses

StatusDescription
200

Paginated list of email conversations.

400

The request is malformed (missing header, invalid JSON, invalid parameter).

401

Unknown API key or invalid format.

403

Authorization denied. Two causes, distinguished by code: insufficient_scope (the key lacks the required scope — details.required_scope) or feature_not_available (the public API or the targeted module isn't included in the account's plan — details.feature names the feature, e.g. public_api, quotes). A plan denial is final for the key: don't retry; the account must change plans.

429

The per-window request quota has been exceeded for this API key or endpoint.

500

Unexpected server error. Always include the request_id when contacting support.

Example request

curl -X GET 'https://api.capturia.io/v1/emails/conversations' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json'
post/v1/emails/send

Send a transactional email

Queues a transactional email for delivery through Resend. The email is created with status="queued", priority=1, type="transactional" and delivered asynchronously by the email worker — the 201 response confirms the email was queued, not that it was delivered.

Sender resolved server-side

The sender (from) is derived from the account's default sender (client_email_senders.is_default = true). If no default sender is configured, the request returns 400 no_sender_configured.

Idempotency

The Idempotency-Key header is NOT supported on this route — a naive retry will create a second send. An internal idempotency key is generated server-side (api-transactional/{clientId}/{ts}) only to protect against duplicate database inserts.

Test mode

"test": true in the body lets you validate an integration without targeting a real contact: personalization variables are filled with sample values, the subject is prefixed with [TEST], and recipient compliance checks are bypassed. In exchange, the recipient must be an active member of the account's team (otherwise 400 recipient_not_allowed), and a quota of 50 tests per rolling 24 hours applies, shared with the platform's test buttons (otherwise 429 test_quota_exceeded).

Required scopes: email:send

Request body

PropertyTypeRequiredDescription
tostringrequiredEmail recipient. Validated against the standard email pattern (^[^\s@]+@[^\s@]+\.[^\s@]+$). An invalid format returns 400 validation_error.
subjectstringrequiredEmail subject (free text, no explicit length cap in the API).
bodystringrequiredEmail body in HTML. The content isn't validated — the sending worker sanitizes it before handing it to Resend for delivery.
testbooleanoptionalTest mode. When true, the send is treated as an operational test: personalization variables ({{first_name}}, etc.) are filled with sample values, the subject is prefixed with [TEST], and recipient compliance checks (unsubscribe, consent) are bypassed. In exchange, two safeguards apply: the recipient (to) must be an active member of the account's team — otherwise 400 recipient_not_allowed; a quota of 50 test sends per rolling 24 hours, shared with the platform's test buttons — otherwise 429 test_quota_exceeded. A test send creates neither a conversation nor any history on a contact.

Responses

StatusDescription
201

Email queued.

400

Parameter or body validation failed.

401

Unknown API key or invalid format.

403

Authorization denied. Two causes, distinguished by code: insufficient_scope (the key lacks the required scope — details.required_scope) or feature_not_available (the public API or the targeted module isn't included in the account's plan — details.feature names the feature, e.g. public_api, quotes). A plan denial is final for the key: don't retry; the account must change plans.

415

The Content-Type header is missing or not supported for this endpoint.

429

The per-window request quota has been exceeded for this API key or endpoint.

500

Unexpected server error. Always include the request_id when contacting support.

Example request

curl -X POST 'https://api.capturia.io/v1/emails/send' \
  -H 'Authorization: Bearer cap_live_<your-key>' \
  -H 'Content-Type: application/json' \
  -d '{
  "to": "[email protected]",
  "subject": "Confirmation de votre commande",
  "body": "<p>Bonjour Alex,</p><p>Votre commande est confirmée.</p>"
}'