Learn how to send SMS via API and set up SMS webhook integration for receiving messages
Welcome to the SMS Forwarder REST API documentation. This comprehensive guide will help you integrate programmable SMS sending and receiving capabilities into your applications using our webhook-based architecture.
All API requests require authentication using an API key. Generate your API key from the API Keys page.
Include your API key in the Authorization header as a Bearer token.
https://sms.smsforwarding.com/apiConfigure webhooks to receive real-time SMS notifications when messages arrive at your devices. Our SMS webhook API delivers incoming messages instantly to your configured endpoints. Visit the Webhooks page to set up your endpoints.
When an SMS is received, your webhook will receive this JSON payload:
{
"event": "incoming_sms",
"timestamp": "2024-02-08T10:30:45.123Z",
"device": {
"id": 123,
"sim_number": "+1234567890",
"device_name": "My Android Device"
},
"sms": {
"id": 456,
"sender": "+9876543210",
"message": "Your verification code is 123456",
"received_at": "2024-02-08T10:30:45.123Z"
}
}Always validate webhook requests by checking the source IP and implementing signature verification. Respond with a 200 status code within 5 seconds to avoid timeouts.
Send SMS messages programmatically through your registered Android devices using our REST API. Simple HTTP POST requests allow you to send SMS to any phone number worldwide.
| Parameter | Type | Required | Description |
|---|---|---|---|
| simNumber | string | Yes | Your device's SIM number (sender) |
| recipients | string or array | Yes | Single recipient (string) or multiple recipients (array of strings) |
| messageContent | string | Yes | Message content (max 160 chars per segment) |
| priority | number | Yes | Message priority level (0-5). We recommend priority 3 for most use cases. |
recipients as a string. Response has batchId: nullrecipients as an array. Response includes a unique batchId for tracking the bulk operationcurl -X POST https://sms.smsforwarding.com/api/sms/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"simNumber": "+917002352056",
"recipients": "+916000089047",
"messageContent": "Hello from SMS Forwarder API!",
"priority": 3
}'When sending to a single recipient, the response includes batchId: null:
{
"success": true,
"message": "SMS queued successfully",
"data": {
"smsIds": [109],
"recipientsCount": 1,
"batchId": null,
"status": "PENDING",
"estimatedProcessingTime": "1-2 minutes",
"createdAt": "2026-02-10T10:32:08.189Z"
}
}When sending to multiple recipients, the response includes a unique batchId for tracking:
{
"success": true,
"message": "Bulk SMS queued successfully",
"data": {
"smsIds": [113, 114],
"recipientsCount": 2,
"batchId": "90366e98-4bb1-4a0e-94f7-d3eea881a679",
"status": "PENDING",
"estimatedProcessingTime": "1-2 minutes",
"createdAt": "2026-02-10T14:45:20.469Z"
}
}| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the request was successful |
| message | string | Human-readable message ("SMS queued successfully" or "Bulk SMS queued successfully") |
| data.smsIds | array | Array of SMS IDs created for tracking delivery status |
| data.recipientsCount | number | Number of recipients |
| data.batchId | string or null | Batch ID for bulk SMS (null for single recipient) |
| data.status | string | Current status (PENDING, QUEUED, etc.) |
| data.estimatedProcessingTime | string | Estimated time for processing |
| data.createdAt | string | ISO 8601 timestamp of creation |
{
"success": false,
"error": "Invalid recipient number",
"code": "INVALID_RECIPIENT"
}If you receive a 429 (Too Many Requests) response, wait before retrying with exponentially increasing delays.
Never expose API keys in client-side code, public repositories, or logs. Use environment variables.
Check webhook delivery logs in the Webhooks page to ensure your endpoints are responding correctly.
SMS messages over 160 characters are split into multiple segments. Plan your billing and UX accordingly.
Our support team is here to help you integrate our SMS API into your applications.