Skip to main content
POST
https://app.tracklysms.com/api
/
v1
/
messages
/
bulk
curl -X POST https://app.tracklysms.com/api/v1/messages/bulk \
  -H "X-Api-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from_phone_number_id": "pn_abc123def456",
    "messages": [
      {
        "to_msisdn": "+14155551234",
        "body": "Hello John! Check out our latest offer."
      },
      {
        "to_msisdn": "+14155551235",
        "body": "Hello Jane! Check out our latest offer."
      },
      {
        "to_msisdn": "+14155551236",
        "body": "Hello Bob! Check out our latest offer."
      }
    ]
  }'
{
  "queued_count": 3,
  "error_count": 0,
  "errors": [],
  "deprecated": true
}
Deprecated: The v1 API is deprecated. All responses include deprecation headers.
Send up to 1,000 SMS messages in a single API request. Each message can have a unique body, allowing for personalization.

Request

from_phone_number_id
string
required
The ID of your sending list/phone number. All messages will be sent from this number.
messages
array
required
Array of message objects to send. Maximum 1,000 per request.Each message object contains:
  • to_msisdn (string, required): Recipient phone number
  • body (string, required): Message body text

Response

queued_count
integer
Number of messages successfully queued
error_count
integer
Number of messages that failed validation
errors
array
List of errors for failed messages, each containing:
  • index: Position in the original array
  • to_msisdn: The phone number that failed
  • error: Description of the error
deprecated
boolean
API deprecation flag. Always true for v1 endpoints.
curl -X POST https://app.tracklysms.com/api/v1/messages/bulk \
  -H "X-Api-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from_phone_number_id": "pn_abc123def456",
    "messages": [
      {
        "to_msisdn": "+14155551234",
        "body": "Hello John! Check out our latest offer."
      },
      {
        "to_msisdn": "+14155551235",
        "body": "Hello Jane! Check out our latest offer."
      },
      {
        "to_msisdn": "+14155551236",
        "body": "Hello Bob! Check out our latest offer."
      }
    ]
  }'
{
  "queued_count": 3,
  "error_count": 0,
  "errors": [],
  "deprecated": true
}

Limits

LimitValue
Maximum messages per request1,000
Maximum message body length1,600 characters (10 segments)
For sends larger than 1,000 messages, split your request into multiple batches or use the dashboard’s campaign scheduling feature.

Partial Failures

The bulk endpoint uses a partial success model:
  • Valid messages are queued even if some fail
  • The response includes both queued_count and error_count
  • The errors array provides details on each failure
This allows you to:
  1. Process the successful sends
  2. Review and retry failed messages separately

Error Handling Example

response = requests.post(url, headers=headers, json=payload)
result = response.json()

if result['error_count'] > 0:
    for error in result['errors']:
        print(f"Failed: {error['to_msisdn']} - {error['error']}")
        # Log for retry or manual review

print(f"Successfully queued: {result['queued_count']} messages")

Performance Tips

Batch Appropriately

Use batches of 500-1000 for optimal throughput

Validate First

Pre-validate phone numbers to reduce errors

Handle Errors

Always check the errors array and handle failures

Use Campaigns

For large sends, use dashboard campaigns instead