Send Your First Message
Make your first API call to send an SMS, WhatsApp, or RCS message.
What you'll accomplish: Get API keys → Send a message → Track delivery
⏳ Time required: ~2 minutes
Prerequisites
Light onboarding path (email + phone verified):
- email and phone verified
- API key copied from dashboard
- Pre-built template ID copied from dashboard
Full production setup path:
- Account set up and KYC approved
- Channels configured
- Custom template created and approved
- API key copied from dashboard
How Message Sending Works
Get Your API Keys
From your Sent Dashboard, copy your API key:
Security reminder: Never commit API keys to version control. Use environment variables.
Send a Message
Choose your preferred method:
# Set your API key and template ID
export SENT_API_KEY="your_api_key_here"
export TEMPLATE_ID="your_template_id_here"
export RECIPIENT="+1234567890"
curl -X POST "https://api.sent.dm/v3/messages" \
-H "x-api-key: $SENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": ["'"$RECIPIENT"'"],
"template": {
"id": "'"$TEMPLATE_ID"'"
},
"channel": ["sms", "whatsapp", "rcs"]
}'Understanding the Response
Success (HTTP 202):
{
"success": true,
"data": {
"status": "QUEUED",
"template_id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
"template_name": "order_confirmation",
"recipients": [
{
"message_id": "8ba7b830-9dad-11d1-80b4-00c04fd430c8",
"to": "+14155551234",
"channel": "sms"
}
]
},
"error": null,
"meta": {
"request_id": "req_7X9zKp2jDw",
"timestamp": "2026-03-04T11:28:25.2096416+00:00",
"version": "v3"
}
}Key fields:
recipients[].message_id- Save this to track the messagerecipients[].channel- Which channel was used (automatically selected)status-QUEUEDon success; the message is now in the sending pipelinemeta.request_id- Use this for support inquiries
Track Delivery Status
Via Dashboard
View message status in the Activities page:
Via Webhooks (Recommended)
Set up webhooks to receive real-time status updates:
{
"field": "message",
"event": "message.delivered",
"timestamp": "2026-01-15T10:35:00Z",
"payload": {
"updated_at": "2026-01-15T10:35:00Z",
"account_id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
"message_id": "8ba7b830-9dad-11d1-80b4-00c04fd430c8",
"template_id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8",
"template_name": "order_confirmation",
"outbound_number": "+14155551234",
"message_status": "DELIVERED",
"channel": "sms"
}
}The full envelope and payload schemas are in the Events Reference.
Via API
Query message status:
curl "https://api.sent.dm/v3/messages/{message_id}" \
-H "x-api-key: $SENT_API_KEY"Refer to the Message Status Tracking guide for the full status lifecycle and tracking patterns, and to the Sending Messages guide and the Send a message API reference for all send options, including channel selection and template variables.
Sandbox Mode
Test without sending real messages by adding "sandbox": true to your request body:
{
"to": ["+1234567890"],
"template": {
"id": "7ba7b820-9dad-11d1-80b4-00c04fd430c8"
},
"channel": ["sms"],
"sandbox": true
}The API validates your request and returns a realistic fake response without executing any side effects: it writes nothing to the database, sends no message, and calls no external API. Look for the X-Sandbox: true header in the response.
Next Steps
You've sent your first message. Here's what to explore next:
Sending Messages Guide
Learn advanced messaging patterns
Set Up Webhooks
Receive delivery notifications
Install an SDK
Integrate with your application
Dashboard Features
Explore the full dashboard
Troubleshooting
401 Unauthorized (AUTH_002)?
- Check your API key is correct
- Ensure the
x-api-keyheader is set (notx-sender-id- that's v2 legacy)
Message shows BLOCKED (insufficient balance)?
- The v3 API accepts the send with
202, then blocks the message asynchronously when your balance is too low - Add funds or a payment method in Billing
400 Bad Request?
- Verify template ID is correct
- Check phone number format (E.164: +1234567890)
- Ensure template is approved (for WhatsApp)
Message stuck in "queued" status?
- Normal for first few seconds
- Check Activities page
- Set up webhooks for real-time updates
Create Your First Template
Create your first message template in the Sent Dashboard: add dynamic variables, submit for WhatsApp and RCS approval, and get the template ID for API sends.
The Sent Dashboard
Tour the Sent Dashboard: send messages from the playground, manage contacts and templates, generate API keys, and monitor deliverability and account balance.