API Reference
Every endpoint is authenticated with an API key sent as a Bearer token or an x-api-key header. Create a key in your dashboard, then call the JSON REST API below.
Authentication
# Pass your key as a Bearer token
curl https://your-app.com/api/v1/me \
-H "Authorization: Bearer sk_live_..."
# ...or as an x-api-key header
curl https://your-app.com/api/v1/me \
-H "x-api-key: sk_live_..."Send an SMS
Send a text message to any phone number in E.164 format.
POST
/api/v1/messagesParameters
tostringrequired- Destination number, e.g. +15551234567.
fromstring- Sender number or ID.
bodystringrequired- The message text. Long messages are split into segments.
Request
curl -X POST /api/v1/messages \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"to": "+15551234567",
"body": "Your code is 123456"
}'Response
{
"id": "msg_128",
"object": "message",
"channel": "sms",
"to": "+15551234567",
"segments": 1,
"status": "queued",
"provider_id": "SM3f9a...",
"created_at": "2026-07-19T12:00:00.000Z"
}Send a WhatsApp message
Deliver a message over WhatsApp. Same shape as SMS.
POST
/api/v1/whatsappParameters
tostringrequired- Recipient WhatsApp number in E.164 format.
fromstring- Your WhatsApp sender number.
bodystringrequired- The message text.
Request
curl -X POST /api/v1/whatsapp \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"to": "+15551234567",
"body": "Hi from WhatsApp!"
}'Response
{
"id": "msg_129",
"object": "message",
"channel": "whatsapp",
"status": "queued",
"provider_id": "WA8c21...",
"created_at": "2026-07-19T12:00:00.000Z"
}Place a voice call
Start an outbound call and speak a message or run TwiML-style instructions.
POST
/api/v1/callsParameters
tostringrequired- Number to call, E.164 format.
fromstring- Caller ID number.
messagestringrequired- Text to speak. Alternatively pass `twiml`.
Request
curl -X POST /api/v1/calls \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"to": "+15551234567",
"message": "Hello from Relay."
}'Response
{
"id": "call_54",
"object": "call",
"channel": "voice",
"status": "queued",
"provider_id": "CA1b77...",
"created_at": "2026-07-19T12:00:00.000Z"
}Send an email
Send a transactional email. Delivered for real over SMTP when configured.
POST
/api/v1/emailParameters
tostringrequired- Recipient email address.
fromstring- Sender address. Defaults to your configured SMTP_FROM.
subjectstringrequired- Email subject line.
textstring- Plain-text body. Provide `text` or `html`.
htmlstring- HTML body. Provide `text` or `html`.
Request
curl -X POST /api/v1/email \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"to": "user@example.com",
"subject": "Welcome",
"text": "Thanks for signing up!"
}'Response
{
"id": "email_77",
"object": "email",
"channel": "email",
"status": "sent",
"provider_id": "<abc@smtp>",
"created_at": "2026-07-19T12:00:00.000Z"
}Verify a key / get account
A simple GET endpoint (no body) to confirm a key is valid and identify the owner.
GET
/api/v1/meParameters
Request
curl /api/v1/me \
-H "Authorization: Bearer sk_live_..."Response
{
"object": "account",
"id": "user_...",
"name": "Ada Lovelace",
"email": "ada@example.com",
"key_id": "key_3",
"authenticated": true
}