Transactional email
Transactional email
Send password resets, receipts, and alerts from your website or mobile backend. Messages use your verified sending domains. They are not marketing campaigns — no list unsubscribe footer is injected.
Send one message
/api/v1/email/messagesmessages:write| to | Required. String or array; supports Name <[email protected]>. One send row per address. |
|---|---|
| cc / bcc | Optional arrays (up to 1000 each). Copied on the first recipient only; each address bills separately. |
| from | Optional Name <addr> on a verified sender identity. Or use fromIdentityId. |
| subject | Required unless template is set. |
| html / text | Body. Required unless template is set. |
| template / templateId | Send compiled template HTML with variables object for {{placeholders}}. |
| attachments | Up to 10 files as { filename, content (base64), contentType? }. Postal provider. |
| headers | Optional custom SMTP headers (e.g. X-Entity-Ref-ID). |
| scheduledAt | ISO 8601 future time (up to 1 year). Returns 202; cancel with DELETE …/messages/{id}. |
| tracking | On by default. Wraps links and adds an open pixel. Set false to skip engagement tracking. |
| unsubscribe | true to append marketing compliance footer (off by default). |
| externalId | Per-message idempotency in the JSON body. |
| metadata | Optional correlation object stored on the send. |
| replyTo | Optional reply-to address. |
curl -sS https://api.thealtermeai.com/api/v1/email/messages \
-H "Authorization: Bearer emk_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "[email protected]",
"subject": "Reset your password",
"html": "<p>Your link…</p>",
"externalId": "password-reset-123"
}'A new send returns 201. Suppressed addresses (bounce or complaint) are recorded as SUPPRESSED without delivering. Work Funds are debited per message at the same rates as the app.
List and retrieve
/api/v1/email/messagesmessages:readNewest first. Filter with externalId. limit defaults to 50 and caps at 200.
curl -sS "https://api.thealtermeai.com/api/v1/email/messages?limit=25" \
-H "Authorization: Bearer emk_YOUR_KEY"/api/v1/email/messages/{messageId}messages:readThe dashboard activity log at Email → Activity shows delivery, opens, and clicks for each send (session auth).
Marketing vs transactional
Campaigns mail an audience with compliance footers and tracking. Transactional mail is one recipient per request, triggered by your product. Use Campaigns for newsletters and POST /api/v1/email/messages for app-triggered mail. Sender identities are documented with Email Marketing because they are the same verified domains.
Webhooks
Subscribe to message.sent, message.delivered, message.bounced, and message.complained on an endpoint under Workspace → Webhooks. message.sent fires when the provider accepts the send; the others follow delivery feedback. Payloads include messageId, to, and your optional externalId / metadata. The event catalogue stays with email because campaign events use the same signatures: Webhooks.