Skip to main content

Bulk Send SMS

Send the same message to multiple selected contacts in a campaign. The AI agent remains active — any replies from contacts will still be handled by the AI as normal.

Endpoint

POST /v1/sms/bulk-send

Authentication

X-API-Key
string
required
Your API key

Request Body

campaign_id
string
required
The campaign ID containing the contacts
phone_numbers
string[]
required
Array of phone numbers to send to (E.164 format recommended, e.g. +15551234567)
message
string
required
The message text to send to all selected contacts

Response

success
boolean
Whether the bulk operation completed (individual messages may still fail)
message
string
Summary of the bulk send results
total
number
Total number of contacts targeted
sent
number
Number of messages sent successfully
failed
number
Number of messages that failed
results
array
Per-contact send results

Example Request

curl -X POST "https://partner.teli.ai/api/proxy/v1/sms/bulk-send" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "campaign_id": "camp_abc123",
    "phone_numbers": ["+15551234567", "+15559876543", "+15558765432"],
    "message": "Hi! We have a special offer for you. Reply YES to learn more."
  }'

Example Response

{
  "success": true,
  "message": "Bulk SMS complete: 2 sent, 1 failed",
  "total": 3,
  "sent": 2,
  "failed": 1,
  "results": [
    {
      "phone_number": "+15551234567",
      "status": "sent"
    },
    {
      "phone_number": "+15559876543",
      "status": "sent"
    },
    {
      "phone_number": "+15558765432",
      "status": "failed",
      "error": "Client +15558765432 not found in campaign camp_abc123"
    }
  ],
  "powered_by": "Teli"
}

Error Responses

400
{
  "success": false,
  "error": "phone_numbers must be a non-empty array",
  "powered_by": "Teli"
}

Important Notes

  • AI stays active — the AI agent will continue handling replies from contacts
  • Contacts must already exist in the specified campaign
  • The endpoint processes messages sequentially; failed sends do not stop remaining messages
  • The response includes per-contact results so you can identify and retry failures