Documentação completa da API com exemplos práticos de uso em cURL e cURL PHP.
{{ url }}
Authorization: Bearer {{ authorization }}
{{ url }},
{{ authorization }} e {{ instance }} pelos
valores
reais da
sua aplicação.
Nome da instância
Biblioteca a ser utilizada: baileys ou
wppconnect
Habilitar ou desabilitar webhook
URL do webhook para receber notificações
curl --location '{{ url }}/v1/instances/create' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json' \
--data '{
"name": "teste",
"lib": "wppconnect",
"webhook_allowed": true,
"webhook_url": "https://webhook.site/2a3d4045-778b-4612-88a8-9ac6064356e8"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/create',
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 => json_encode([
'name' => 'teste',
'lib' => 'wppconnect',
'webhook_allowed' => true,
'webhook_url' => 'https://webhook.site/2a3d4045-778b-4612-88a8-9ac6064356e8'
]),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
curl --location '{{ url }}/v1/instances/list' \
--header 'Authorization: Bearer {{ authorization }}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/list',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
curl --location '{{ url }}/v1/instances/{{ instance }}/qrcode' \
--header 'Authorization: Bearer {{ authorization }}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/{{ instance }}/qrcode',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
curl --location '{{ url }}/v1/instances/{{ instance }}/status' \
--header 'Authorization: Bearer {{ authorization }}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/{{ instance }}/status',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
curl --location '{{ url }}/v1/profile/{{ instance }}/picture' \
--header 'Authorization: Bearer {{ authorization }}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/profile/{{ instance }}/picture',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
Novo nome da instância
curl --location --request PUT '{{ url }}/v1/instances/{{ instance }}/name' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json' \
--data '{
"name": "Alterado via painel"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/{{ instance }}/name',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Alterado via painel'
]),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
Biblioteca a ser utilizada: baileys ou
wppconnect
curl --location --request PUT '{{ url }}/v1/instances/{{ instance }}/library' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json' \
--data '{
"lib": "wppconnect"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/{{ instance }}/library',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode([
'lib' => 'wppconnect'
]),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
Habilitar ou desabilitar webhook
URL do webhook para receber notificações
curl --location --request PUT '{{ url }}/v1/instances/{{ instance }}/webhook' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json' \
--data '{
"webhook_allowed": true,
"webhook_url": "https://webhook.site/2a3d4045-778b-4612-88a8-9ac6064356e8"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/{{ instance }}/webhook',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => json_encode([
'webhook_allowed' => true,
'webhook_url' => 'https://webhook.site/2a3d4045-778b-4612-88a8-9ac6064356e8'
]),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
curl --location --request DELETE '{{ url }}/v1/instances/{{ instance }}/disconnect' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/{{ instance }}/disconnect',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
curl --location --request DELETE '{{ url }}/v1/instances/{{ instance }}' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/instances/{{ instance }}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Retorna as informações do usuário autenticado, incluindo dados de perfil e configurações.
curl --location '{{ url }}/v1/users/info' \
--header 'Authorization: Bearer {{ authorization }}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/users/info',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
Número do destinatário (com código do país, sem + ou espaços)
Conteúdo da mensagem
curl --location '{{ url }}/v1/message/{{ instance }}/text' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json' \
--data '{
"to": "5511942306665",
"message": "Boa tarde!"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/message/{{ instance }}/text',
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 => json_encode([
'to' => '5511942306665',
'message' => 'Boa tarde!'
]),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
Número do destinatário (com código do país, sem + ou espaços)
URL pública da imagem
Legenda da imagem
curl --location '{{ url }}/v1/message/{{ instance }}/image' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json' \
--data '{
"to": "5511942306665",
"url": "https://images.pexels.com/photos/1097456/pexels-photo-1097456.jpeg",
"caption": "Imagem top"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/message/{{ instance }}/image',
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 => json_encode([
'to' => '5511942306665',
'url' => 'https://images.pexels.com/photos/1097456/pexels-photo-1097456.jpeg',
'caption' => 'Imagem top'
]),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
Número do destinatário (com código do país, sem + ou espaços)
URL pública do vídeo
Legenda do vídeo
curl --location '{{ url }}/v1/message/{{ instance }}/video' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json' \
--data '{
"to": "5511942306665",
"url": "https://hpanel.vip/chatbot/archives/666763da9f5f54.04656147.mp4",
"caption": "Bom video"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/message/{{ instance }}/video',
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 => json_encode([
'to' => '5511942306665',
'url' => 'https://hpanel.vip/chatbot/archives/666763da9f5f54.04656147.mp4',
'caption' => 'Bom video'
]),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Nome ou ID da instância
Número do destinatário (com código do país, sem + ou espaços)
URL pública do áudio (formato MP3 ou OGG)
curl --location '{{ url }}/v1/message/{{ instance }}/audio' \
--header 'Authorization: Bearer {{ authorization }}' \
--header 'Content-Type: application/json' \
--data '{
"to": "5511942306665",
"url": "https://hpanel.vip/chatbot/archives/66858be6108356.08873769.mp3"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{ url }}/v1/message/{{ instance }}/audio',
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 => json_encode([
'to' => '5511942306665',
'url' => 'https://hpanel.vip/chatbot/archives/66858be6108356.08873769.mp3'
]),
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer {{ authorization }}',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Última atualização: Novembro de 2025