Send a single transactional email (template and variables, or custom content)
const url = 'https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/messages';const options = { method: 'POST', headers: { 'idempotency-key': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"stream":"example","template":{"id":"example","version":"current"},"content":{"subject":"example","html":"example","text":"example"},"to":{"email":"hello@example.com","name":"example"},"variables":{"order_id":"A-1001","total":"$450.00"},"locale":"es-MX","metadata":{"orderId":"A-1001"},"sendAt":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/brands/brd_01hx0000000000000000000000/messages \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'idempotency-key: example' \ --data '{ "stream": "example", "template": { "id": "example", "version": "current" }, "content": { "subject": "example", "html": "example", "text": "example" }, "to": { "email": "hello@example.com", "name": "example" }, "variables": { "order_id": "A-1001", "total": "$450.00" }, "locale": "es-MX", "metadata": { "orderId": "A-1001" }, "sendAt": "2026-04-15T12:00:00Z" }'Requires the Idempotency-Key header. The same key and same body return the same id (header Idempotent-Replayed); a different body returns 409 idempotency_conflict. Response 202: the message was queued in repf-tx. A suppressed recipient is rejected with 422 recipient_suppressed.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
brd_01hx0000000000000000000000Header Parameters
Section titled “Header Parameters”Unique key per email (for example, a UUID). Kept for 24 hours in the idempotency table and permanently on the message.
Unique key per email (for example, a UUID). Kept for 24 hours in the idempotency table and permanently on the message.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Stream short name; if omitted, the brand default stream.
Custom content, for callers that do not use templates. Same size limit as M5: blocked at 100 KB of HTML.
object
object
Deferred send: ISO date up to 72 hours ahead; anything later belongs in a campaign send plan.
Responses
Section titled “Responses”Message accepted
object
Example
{ "status": "queued"}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Conflict
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Error
object
object
Example
{ "error": { "code": "not_found" }}Too many attempts
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}Service temporarily unavailable
object
object
Example
{ "error": { "code": "not_found" }}