Skip to main content
POST
/
api
/
v1
/
sms
/
send
/
bulk
Send Bulk SMS
curl --request POST \
  --url https://api.example.com/api/v1/sms/send/bulk \
  --header 'Content-Type: application/json' \
  --data '
{
  "recipients": [
    {}
  ],
  "message": "<string>"
}
'
{
  "status": "<string>",
  "message": "<string>",
  "recipients": [
    {}
  ],
  "message_ids": [
    {}
  ],
  "sent_count": 123
}

Overview

Send the same SMS message to multiple recipients in a single API call. Useful for broadcasting notifications or updates to multiple parties.

Request Body

recipients
array
required
Array of phone numbers with country codes (e.g., ["+254712345678", "+254798765432"])
message
string
default:"Hello from VoicePact!"
SMS message content to send to all recipients

Response

status
string
Overall status of the bulk SMS operation
message
string
Human-readable status message
recipients
array
Array of recipient phone numbers
message_ids
array
Array of message IDs for successfully sent messages
sent_count
number
Number of messages successfully sent

Example Request

curl -X POST http://localhost:8000/api/v1/sms/send/bulk \
  -H "Content-Type: application/json" \
  -d '{
    "recipients": [
      "+254712345678",
      "+254798765432",
      "+254733000000"
    ],
    "message": "Important update: Your contract status has changed"
  }'

Example Response

{
  "status": "success",
  "message": "Bulk SMS sent successfully",
  "recipients": [
    "+254712345678",
    "+254798765432",
    "+254733000000"
  ],
  "message_ids": [
    "ATXid_abc123",
    "ATXid_def456",
    "ATXid_ghi789"
  ],
  "sent_count": 3
}

Error Response

{
  "detail": "SMS service unavailable. Check AT_API_KEY."
}

Status Codes

  • 200 - Bulk SMS sent successfully
  • 500 - Bulk SMS failed
  • 503 - SMS service unavailable

Use Cases

  • Notify all parties in a contract
  • Send broadcast announcements
  • Send payment reminders to multiple users
  • Distribute contract confirmations

Best Practices

Keep messages under 160 characters to avoid SMS segmentation and reduce costs.
For very large recipient lists, consider batching requests to avoid timeouts.
Check individual message statuses in the response to identify failed deliveries.

Send SMS

Send to single recipient

Contract SMS

Send contract notifications

Build docs developers (and LLMs) love