API reference

Send a message

The headline endpoint. Returns 202 immediately; the message is processed by a background worker within ~50ms.

POST/v1/messages

Authenticate with X-Raven-Key: rk_live_.... The tenant is implied by the key.

Request

curl
curl -X POST https://api-raven-cloud.autotribes.app/v1/messages \
  -H "X-Raven-Key: rk_live_a3f7b2c1_..." \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "sms",
    "to": "+254722000000",
    "body": "Hi Ada, your order #AC-1042 is on its way."
  }'

Body parameters

FieldTypeNotes
channelrequiredsms · email · push · whatsapp
torequiredE.164 phone for SMS, or email address for email. 1–200 chars.
bodySMS · required1–4096 chars. Auto-segments at 160 chars per SMS.
fromemail · requiredRFC5322 from address, e.g. noreply@mail.acme.co.ke
subjectemail · requiredEmail subject line
bodyHtmlemail · recommendedHTML email body
bodyTextemail · recommendedPlain-text fallback. Improves deliverability when sent alongside bodyHtml.
externalIdoptionalYour own reference ID

Response

202 Accepted

json
{
  "id": "8ad4f7c2-9e3b-4a1c-bc2f-1d8e3a9b7c4d",
  "status": "queued",
  "channel": "sms",
  "to": "+254722000000",
  "enqueuedAt": "2026-05-01T10:23:18.114Z"
}

ASYNC BY DESIGN

We return 202 the moment the message is persisted and queued. The actual provider call happens in a worker, usually within 50ms. Use GET /v1/admin/messages/:id to check final status, or configure provider webhooks for real-time delivery events.

Errors

StatusWhen
400Missing required field, or no provider configured for the channel
401Invalid or expired API key
403Tenant suspended
409Idempotency key already used with a different payload
429Rate limit hit — backoff per Retry-After