Authentication
All API requests require authentication using an API key. Include your key in the request header:
# Include in every request
Authorization: Bearer YOUR_API_KEY
# Get your API key from the dashboard
# https://dashboard.sendpulse.io/settings/keys
Keep your API key secure. Never expose it in client-side code or public repositories.
Quick Start
Send your first SMS in under a minute. Here's an example using cURL:
curl -X POST https://api.sendpulse.io/v1/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "+1234567890",
"from": "MyApp",
"text": "Hello from SendPulse!"
}'
Python Example
import requests
response = requests.post(
"https://api.sendpulse.io/v1/sms/send",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"to": "+1234567890",
"from": "MyApp",
"text": "Hello from SendPulse!"
}
)
print(response.json())
Send SMS
POST
/v1/sms/send
Send an SMS message to a single recipient or a list of recipients.
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient phone number in E.164 format |
from | string | Yes | Sender ID or phone number |
text | string | Yes | Message content (max 1600 chars) |
callback_url | string | No | URL for delivery status webhook |
scheduled_at | string | No | ISO 8601 datetime for scheduled delivery |
Message Status
GET
/v1/sms/{message_id}
Retrieve the current status of a sent message.
// Response
{
"id": "msg_9f8a7b6c",
"to": "+1234567890",
"status": "delivered",
"delivered_at": "2026-01-15T10:30:00Z",
"segments": 1,
"cost": 0.0075
}
Make a Call
POST
/v1/voice/call
Initiate an outbound voice call with programmable actions.
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient phone number |
from | string | Yes | Your voice-enabled number |
actions | array | Yes | Call flow actions (say, play, gather, record) |
timeout | integer | No | Ring timeout in seconds (default: 30) |
Start Verification
POST
/v1/verify/start
Send a one-time verification code to a user.
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Phone number to verify |
channel | string | No | Delivery channel: sms, voice, whatsapp (default: sms) |
code_length | integer | No | OTP length: 4-8 digits (default: 6) |
expiry | integer | No | Code expiry in seconds (default: 300) |
Check Verification Code
POST
/v1/verify/check
curl -X POST https://api.sendpulse.io/v1/verify/check \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "vrf_a1b2c3d4",
"code": "482901"
}'
// Response
{ "valid": true, "request_id": "vrf_a1b2c3d4" }
Error Codes
| Code | Status | Description |
|---|---|---|
401 | Unauthorized | Invalid or missing API key |
400 | Bad Request | Invalid parameters |
402 | Payment Required | Insufficient balance |
404 | Not Found | Resource does not exist |
429 | Rate Limited | Too many requests (wait and retry) |
500 | Server Error | Internal error (contact support) |
Webhooks
Receive real-time notifications about message delivery, call events, and verification results by configuring webhook URLs.
// Delivery webhook payload
POST your-callback-url
{
"event": "sms.delivered",
"message_id": "msg_9f8a7b6c",
"to": "+1234567890",
"status": "delivered",
"timestamp": "2026-01-15T10:30:00Z"
}
Webhook requests include an X-Signature header for payload verification. Always validate signatures in production.