Send your first message
Create a test key, send an SMS to your own phone and read the delivery status — in under five minutes.
Create a test key, send an SMS to your own phone and read the delivery status — in under five minutes. 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
Test mode never sends real messages or charges your account.
Example#
curl https://api.relay.example/v3/messages \
-H "Authorization: Bearer $RELAY_KEY" \
-d channel=sms \
-d to=+15550100001 \
-d body="Your code is 482913"import Relay from '@relay/node';
const relay = new Relay(process.env.RELAY_KEY);
const msg = await relay.messages.create({
channel: 'sms',
to: '+15550100001',
body: 'Your code is 482913',
});
console.log(msg.status); // queuedimport os, relay
client = relay.Client(os.environ["RELAY_KEY"])
msg = client.messages.create(
channel="sms", to="+15550100001", body="Your code is 482913"
)
print(msg.status) # queuedStill 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!