API Reference · Emails
Send email
Send a transactional email. The call is accepted immediately and the message is queued for delivery; track it via events or webhooks.
POST/v1/messages
Headers
Authorizationstringrequired
Your API key as a bearer token:
Bearer rk_your_api_key. You can also use the X-Api-Key header.Idempotency-Keystringoptional
Recommended. Retries with the same key return the original message instead of sending twice.
Body parameters
tostringrequired
Recipient email address.
fromstringoptional
Sender on one of your verified domains, e.g.
Acme <noreply@acme.co>. Defaults to your domain's noreply@.subjectstringoptional
Email subject. Required unless you send from a template.
htmlstringoptional
The HTML version of the message. Provide
html, text, or a template.textstringoptional
The plain-text version of the message.
templateIdstringoptional
Render the message from a saved template's current version.
templateVersionIdstringoptional
Pin a specific template version instead of the current one.
variablesobjectoptional
Values for
{{ placeholders }} in the template.Request
curl -X POST https://api.raanse.com/v1/messages \
-H "Authorization: Bearer rk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <noreply@acme.co>",
"to": "customer@example.com",
"subject": "Welcome to Acme",
"html": "<h1>Hello 👋</h1><p>Thanks for signing up.</p>"
}'Response
201{
"success": true,
"message": "Resource created",
"statusCode": 201,
"data": {
"id": "01JABCDXYZ0000000000000000",
"status": "Queued",
"to": "customer@example.com",
"fromAddress": "noreply@acme.co",
"subject": "Welcome to Acme",
"providerMessageId": null,
"templateVersionId": null,
"attempts": 0,
"createdAt": "2026-07-02T12:00:00Z"
}
}