📱 Documentação da API ZapiPro

Documentação completa da API com exemplos práticos de uso em cURL e cURL PHP.

⚙️ Configuração

Base URL: {{ url }}
Autenticação: Bearer Token
Header de Autenticação: Authorization: Bearer {{ authorization }}
📌 Importante: Substitua {{ url }}, {{ authorization }} e {{ instance }} pelos valores reais da sua aplicação.

🔌 Instâncias

POST Criar Conexão
POST {{ url }}/v1/instances/create
Parâmetros do Body:
name (string, obrigatório)

Nome da instância

lib (string, obrigatório)

Biblioteca a ser utilizada: baileys ou wppconnect

webhook_allowed (boolean, obrigatório)

Habilitar ou desabilitar webhook

webhook_url (string, opcional)

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;
GET Listar Instâncias
GET {{ url }}/v1/instances/list
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;
GET Obter QR Code
GET {{ url }}/v1/instances/:instance/qrcode
Parâmetros da URL:
:instance (string, obrigatório)

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;
GET Verificar Status
GET {{ url }}/v1/instances/:instance/status
Parâmetros da URL:
:instance (string, obrigatório)

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;
GET Pegar Imagem de Perfil
GET {{ url }}/v1/profile/:instance/picture
Parâmetros da URL:
:instance (string, obrigatório)

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;
PUT Alterar Nome da Instância
PUT {{ url }}/v1/instances/:instance/name
Parâmetros da URL:
:instance (string, obrigatório)

Nome ou ID da instância

Parâmetros do Body:
name (string, obrigatório)

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;
PUT Alterar Biblioteca
PUT {{ url }}/v1/instances/:instance/library
Parâmetros da URL:
:instance (string, obrigatório)

Nome ou ID da instância

Parâmetros do Body:
lib (string, obrigatório)

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;
PUT Alterar Webhook
PUT {{ url }}/v1/instances/:instance/webhook
Parâmetros da URL:
:instance (string, obrigatório)

Nome ou ID da instância

Parâmetros do Body:
webhook_allowed (boolean, obrigatório)

Habilitar ou desabilitar webhook

webhook_url (string, opcional)

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;
DELETE Desconectar Instância
DELETE {{ url }}/v1/instances/:instance/disconnect
Parâmetros da URL:
:instance (string, obrigatório)

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;
DELETE Deletar Instância
DELETE {{ url }}/v1/instances/:instance
Parâmetros da URL:
:instance (string, obrigatório)

Nome ou ID da instância

⚠️ Atenção: Esta ação é irreversível e removerá permanentemente a 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;

👤 Usuários

GET Obter Informações do Usuário
GET {{ url }}/v1/users/info
Descrição:

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;

💬 Mensagens

POST Enviar Mensagem de Texto
POST {{ url }}/v1/message/:instance/text
Parâmetros da URL:
:instance (string, obrigatório)

Nome ou ID da instância

Parâmetros do Body:
to (string, obrigatório)

Número do destinatário (com código do país, sem + ou espaços)

message (string, obrigatório)

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;
POST Enviar Imagem
POST {{ url }}/v1/message/:instance/image
Parâmetros da URL:
:instance (string, obrigatório)

Nome ou ID da instância

Parâmetros do Body:
to (string, obrigatório)

Número do destinatário (com código do país, sem + ou espaços)

url (string, obrigatório)

URL pública da imagem

caption (string, opcional)

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;
POST Enviar Vídeo
POST {{ url }}/v1/message/:instance/video
Parâmetros da URL:
:instance (string, obrigatório)

Nome ou ID da instância

Parâmetros do Body:
to (string, obrigatório)

Número do destinatário (com código do país, sem + ou espaços)

url (string, obrigatório)

URL pública do vídeo

caption (string, opcional)

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;
POST Enviar Áudio
POST {{ url }}/v1/message/:instance/audio
Parâmetros da URL:
:instance (string, obrigatório)

Nome ou ID da instância

Parâmetros do Body:
to (string, obrigatório)

Número do destinatário (com código do país, sem + ou espaços)

url (string, obrigatório)

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