Send SMS, email and push with one call
One endpoint, three channels: set <code>channel</code> and Relay handles formatting, retries and fallbacks.
On this page
One endpoint, three channels: set channel and Relay handles formatting, retries and fallbacks. Follow the steps below — it takes just a few minutes.
Before you begin#
- A Relay account and a test-mode API key
curlor one of the official SDKs
Steps#
Tip
Use idempotency keys so a retried request never sends twice.
POST/v3/messages
Create a message#
Queues a message on one channel, with an optional fallback channel.
Requires messages:write
Parameters
channelstringrequiredsms,emailorpush.tostringrequired- Phone number in E.164 format, email address or device token.
bodystringrequired- Message text. SMS longer than 160 characters is split.
fallbackstring- Channel to try if the first one fails.
send_atdatetime- Schedule for later (ISO 8601).
curl https://api.relay.example/v3/messages \
-H "Authorization: Bearer $RELAY_KEY" \
-H "Idempotency-Key: order-1042-receipt" \
-d channel=sms -d fallback=email \
-d to=+15550100001 -d body="Order #1042 shipped"{
"id": "msg_7Hq2kD",
"channel": "sms",
"status": "queued",
"fallback": "email",
"created_at": "2026-10-12T16:04:11Z"
}Still stuck?#
Include the request ID from the Relay-Request-Id response header — it lets us find your call in seconds.
Was this article helpful?
Thanks for letting us know!