APIs ›
Botões no WhatsApp ›
API Botão Ligação
API Botão Ligação
🧩 A API de botão Ligação permite o envio de uma mensagem com até 3 botões para que o usuário inicie uma ligação.
API: Pro
Verifique aqui os Pré-Requisitos para utilizar Botões
Endpoint
https://{BACKEND_URL}/api/messages/whatsmeow/sendButtonsPRO
Método
POST
Autenticação
Bearer {seutokenaqui}
Payload
{
"openTicket": 0,
"body" : [
{
"phone": "554498108792",
"title": "Precisa de atendimento?",
"body": "Clique para ligar!",
"footer": "Central de Atendimento",
"buttons": [
{
"type": "call",
"text": "Ligar setor Comercial",
"phoneNumber": "+5511988888888"
},
{
"type": "call",
"text": "Ligar setor Financeiro",
"phoneNumber": "+5511977777777"
},
{
"type": "call",
"text": "Ligar setor Expedição",
"phoneNumber": "+5511966666666"
}
]
}
]
}
➡️ “openTicket”: – “0” Não abre ticket – “1” Abre Ticket ➡️ “phone”: telefone do destinatário no formato ddi ddd numero (somente números) ➡️ “title”: texto do título ➡️ “body”: texto principal ➡️ “footer”: texto do rodapé ➡️ “buttons”: – type: call – text: texto do botão – phoneNumber: +numero
📌 Opcional repetir até 3 botões.
📌 É possível combinar botões type “call”, “url” e “copy” no mesmo envio.
API Utilize o código em requisições HTTPS com ferramentas como cURL ou bibliotecas de integração.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://{BACKEND_URL}/api/messages/whatsmeow/sendButtonsPRO',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"openTicket": 0,
"body" : [
{
"phone": "554498108792",
"title": "Precisa de atendimento?",
"body": "Clique para ligar!",
"footer": "Central de Atendimento",
"buttons": [
{
"type": "call",
"text": "Ligar setor Comercial",
"phoneNumber": "+5511988888888"
},
{
"type": "call",
"text": "Ligar setor Financeiro",
"phoneNumber": "+5511977777777"
},
{
"type": "call",
"text": "Ligar setor Expedição",
"phoneNumber": "+5511966666666"
}
]
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Bearer {seutokenaqui}' //Token cadastrado na conexão
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;