Messages

Send quick bulk SMS to multiple contacts

POST
/api/messages/quick-bulk-send

Fan-out send of a single SMS body (or templated body via templateId) to up to 50,000 contacts. Up to 500 distinct contacts are sent inside the request, which returns 200 with a per-contact result list with success/error so the UI can surface partial failures. More than 500 distinct contacts are not sent in the request: they become a durable bulk_sms async operation, which the async-operation runner sends one contact at a time, and the request returns 202 with queued: true, the operationId (also in jobId) and its status, a summary with nothing sent yet and an empty results. Any user who may send a quick bulk send may queue one; the chosen line's grant is checked first. More than 50,000 contactIds returns 400; select all and use the bulk SMS operation (POST /api/contacts/query-bulk-sms) instead. Messages sent by a quick bulk send do not emit per-message live conversation updates.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Either message or templateId must be provided, but not both

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/messages/quick-bulk-send" \  -H "Content-Type: application/json" \  -d '{    "contactIds": [      "65c2d0e0f0a0b0c0d0e0f0a0",      "65c2d0e0f0a0b0c0d0e0f0a1"    ],    "message": "Hi {{firstName}}, our team will be in touch shortly."  }'
{  "success": true,  "summary": {    "total": 2,    "success": 1,    "failed": 1  },  "results": [    {      "contactId": "65c2d0e0f0a0b0c0d0e0f0a0",      "success": true,      "name": "Jane Doe",      "messageId": "SMxxx",      "messageDocId": "67d0a0b0c0d0e0f0a0b0c0d0",      "status": "queued"    },    {      "contactId": "65c2d0e0f0a0b0c0d0e0f0a1",      "success": false,      "name": "John Smith",      "error": "Invalid phone number"    }  ]}