Skip to main content
POST
/
instances
/
{instanceId}
/
token
/
{token}
/
broadcast
Create broadcast list
curl --request POST \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/broadcast \
  --header 'Client-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "phones": [
    {}
  ]
}
'

Overview

This method allows you to create a new broadcast list by defining a name and the numbers that will be part of it.
Please be aware of the limitations and rules around the use of broadcast lists. For more details, check the introduction.

Attributes

instanceId
string
required
Your instance ID. Available in the Z-API panel under Instances.
token
string
required
Your Z-API instance token.

Required

name
string
required
Name of the broadcast list
phones
array
required
List of recipient numbers in E.164 format without +. Ex: 5511999999999

Request Body

{
  "name": "List name",
  "phones": ["5511999999999", "5511888888888"]
}

Response

200

{
  "broadcastId": "1779474934@broadcast",
  "name": "List name",
  "phones": [
    "5511999999999",
    "5511888888888"
  ]
}

405

Make sure you are sending the request with the correct HTTP method. Check that you are using POST as specified at the top of this page.

415

If you receive a 415 error, make sure to include the Content-Type header in your request. In most cases, the value should be application/json.