Create a new broadcast
Changed onCreates 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: text sends a free-form text message. It only reaches contacts with an open service window (i.e. that messaged the business recently).
- type: template sends 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 status pending and the recipients are resolved asynchronously; once resolved it moves to ready (or scheduled).
- 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 status ready (or scheduled, when scheduleDate is 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.
Request
- Base URLhttps://messenger-public-api.cogfy.com
- AuthAPI key in header api-key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Response
Broadcast created successfully
Changes
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info
- breaking
added the new required request property
- breaking
request body became required
- breaking
the request property
became required - breaking
added the pattern
^([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)$to the request property/// - warning
removed the request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
the
request property default valuetextwas added - info
added the new
templateenum value to the request property - info
added the non-success response with the status
- info
the response property
became required for the status - info
the
response's property pattern^([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)$was added for the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking