Emails
2 endpoints
/v1/emails/conversationsList 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.
email:readResponses
| Status | Description |
|---|---|
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 |
429 | The per-window request quota has been exceeded for this API key or endpoint. |
500 | Unexpected server error. Always include the |
Example request
curl -X GET 'https://api.capturia.io/v1/emails/conversations' \
-H 'Authorization: Bearer cap_live_<your-key>' \
-H 'Content-Type: application/json'/v1/emails/sendSend 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).
email:sendRequest body
| Property | Type | Required | Description |
|---|---|---|---|
to | string | required | Email recipient. Validated against the standard email pattern
(^[^\s@]+@[^\s@]+\.[^\s@]+$). An invalid format returns
400 validation_error. |
subject | string | required | Email subject (free text, no explicit length cap in the API). |
body | string | required | Email body in HTML. The content isn't validated — the sending worker sanitizes it before handing it to Resend for delivery. |
test | boolean | optional | Test 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
| Status | Description |
|---|---|
201 | Email queued. |
400 | Parameter or body validation failed. |
401 | Unknown API key or invalid format. |
403 | Authorization denied. Two causes, distinguished by |
415 | The |
429 | The per-window request quota has been exceeded for this API key or endpoint. |
500 | Unexpected server error. Always include the |
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>"
}'