Create a new broadcast
Creates a broadcast for a phone number of the workspace.
Message type (type) and recipient source are independent choices — any combination of them is valid:
type: textsends a free-form text message. It only reaches contacts with an open service window (i.e. that messaged the business recently).type: templatesends an approved WhatsApp template message. Required to reach recipients that never messaged the business or whose service window is closed.
Recipient source — exactly one of the following must be provided, regardless of type:
contactsQuery: filters contacts already registered in the workspace by tag. The broadcast is created with statuspendingand the recipients are resolved asynchronously; once resolved it moves toready(orscheduled).contacts: an explicit list of recipients sent in the request body, which does not require the contacts to be registered. The broadcast messages are created synchronously and the broadcast is returned already in statusready(orscheduled, whenscheduleDateis provided).
A broadcast in status ready is only sent after calling POST /broadcasts/{broadcastId}/send. A broadcast in status scheduled is sent automatically at scheduleDate.
Authorizations
Body
Broadcast title, used for identification
100Id or phone number of the sender phone number
1text sends a free-form text message. template sends an approved WhatsApp template message
text, template Message content. Required when type is text
1024Template specification. Required when type is template
Filter for contacts already registered in the workspace. Mutually exclusive with contacts
Explicit list of recipients. Mutually exclusive with contactsQuery
1 - 10000 elementsWhen provided, the broadcast is scheduled to be sent automatically at this date. Must be in the future
Number of messages sent per batch
1 <= x <= 1000Interval in minutes between batches
1 <= x <= 9007199254740991Start of the time window in which batches may be sent (HH:MM)
^([01]\d|2[0-3]):[0-5]\d$End of the time window in which batches may be sent (HH:MM)
^([01]\d|2[0-3]):[0-5]\d$IANA timezone used to evaluate the allowed send time window
WhatsApp API used to deliver the messages
cloud_api, mm_api Response
Broadcast created successfully
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$pending when the recipients still have to be resolved from contactsQuery, ready when the broadcast is ready to be sent and scheduled when it will be sent at scheduleDate
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$Number of contacts processed. Only returned when creating from an explicit contacts list
-9007199254740991 <= x <= 9007199254740991Number of batches the contacts were split into. Only returned when creating from an explicit contacts list
-9007199254740991 <= x <= 9007199254740991