Skip to main content

Make a call

Método#

/send-call#

POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/send-call

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Conceituação#

In this method you send a call to a number that has whatsapp, whether it is your contact or not.


Atributos#

Obrigatórios#

AtributosTipoDescrição
phonestringRecipient telephone number in the format DDI DDD NUMERS Ex: 551199999999. IMPORTANT only send numbers without formatting or a mask

Opcionais#

AtributosTipoDescrição
callDurationnumberHere you define how long you want the call to last, by default the call will last 5 seconds, but you can increase it up to 15 seconds

Request Body#

{
"phone": "5511999999999",
"callDuration": 5
}

Response#

200#

AttributesTypeDescription
zaapIdstringid on z-api
messageIdstringid on whatsapp

Exemplo

{
"zaapId": "3999984263738042930CD6ECDE9VDWSA",
"messageId": "D241XXXX732339502B68",
"id": "D241XXXX732339502B68"
}

405#

In this case certify that you are sending the correct specification of the method. This means, verify if you sent a POST or GET as specified at the beginning of this topic.

415#

In case you receive 415 error, make sure to add the “Content-Type” of the object you are sending in the request headers, mostly “application/json”


Webhook Response#

Link for webhooks response (upon receiving) Webhook


Code#