Skip to main content
POST
Bulk send messages

Authorizations

Authorization
string
header
required

HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).

Headers

Idempotency-Key
string

Up to 50 visible ASCII characters without a colon, naming this call. Within 7 days, a retried call never sends a row twice; after that it is a new call.

Required string length: 1 - 50
Pattern: ^[\x21-\x39\x3B-\x7E]{1,50}$
Example:

"3f6c1b2e-7a1d-4a8e-9c55-0d2b7e4f9a10"

Body

application/json
messages
object[]
required

1 to 50 rows, one message each.

Required array length: 1 - 50 elements
from
string

One of your numbers, as its id or in E.164, for every row. Leave it out to send each row from the number of your latest conversation with its recipient.

channel
enum<string>
default:sms
Available options:
sms,
whatsapp
body
string

The shared text, for every row without a body of its own. Each row needs text: this, its own body, or a shared whatsappTemplate.

Required string length: 1 - 1600
whatsappTemplate
object

A shared WhatsApp template. Needs channel: whatsapp, and goes alone: no shared or row body. A row may add its own variables.

userId
string

Send every row as this user.

Response

One result per row, in request order. The call succeeds even when rows fail.

data
object[]
required

One result per row, in request order.

requestId
string
required