Introduction
The WaziMe API follows RESTful architecture standards, offering clear and consistent resource-based endpoints. All requests and responses are transmitted in JSON format, leveraging standard HTTP verbs, status codes, and authentication protocols to enable secure, efficient, and scalable integrations.
API Base URL
Please note that WaziMe does not provide a sandbox or test environment. All API requests are processed in the live environment, so ensure that all request data and parameters are accurate before making any calls.
https://www.wazime.com.br.socorreaki.com.br/external-api
Authentication
All requests to the WaziMe API require authentication. Each API request must include a valid client-id and client-secret to the request header, which can be obtained from your WaziMe Dashboard under Developer Tools.
In addition to credentials, WaziMe enforces IP-based security. You must register and enable your server’s public IP address in the IP Whitelist section of the dashboard. Requests originating from non-whitelisted IP addresses will be automatically rejected.
Both valid API credentials and an approved IP address are mandatory. Without completing these two steps, authentication will fail and API access will not be granted.
Response Format
All responses from the WaziMe API are returned in JSON format. Each response follows a consistent structure and includes a status indicator, message, and relevant data payload when applicable. Standard HTTP status codes are used to represent the outcome of each request.
Resposta de Sucesso de Exemplo
{
"status": "success",
"remark": "contact_list",
"message":[
"Contact list fetched successfully"
],
"data": {
...you get all data here
}
}
Resposta de Erro de Exemplo
{
"remark": "Unauthorized",
"status": "error",
"message": [
"The client secret is required"
]
}
{
"remark": "Unauthorized",
"status": "error",
"message": [
"Access to this API endpoint is restricted to IP addresses that have been explicitly whitelisted.",
"In order to access this API endpoint, please add your IP address (::1) to the white list from the user dashboard."
]
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/contact/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(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Get Contact List
This endpoint allows you to retrieve a complete list of contacts associated with your WaziMe account.
Parâmetros de Consulta
Parâmetros de consulta que permitem personalizar a resposta da API.
| Nome | Descrição | Obrigatório | Padrão |
|---|---|---|---|
página |
Especifica o número da página a ser recuperada. | Não | 1 |
paginar |
Define o número de itens retornados por página. | Não | 20 |
buscar |
Busca contatos por nome, sobrenome ou número de celular. | Não | - |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/contact/store',
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 => array('firstname' => 'John','lastname' => 'Doe','mobile_code' => '880','mobile' => '01988'),
CURLOPT_HTTPHEADER => array(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Criar Novo Contato
This endpoint allows you to add a new contact to your WaziMe account. Provide the necessary contact details, and upon successful request, the API returns the created contact’s information in JSON format for easy integration.
Campos Obrigatórios
Os seguintes campos são obrigatórios para criar um novo contato no sistema.
| Nome | Obrigatório | Padrão |
|---|---|---|
nome |
Sim | - |
sobrenome |
Sim | - |
código_celular |
Sim | - |
celular |
Sim | - |
cidade |
Não | - |
estado |
Não | - |
cep |
Não | - |
endereço |
Não | - |
imagem_perfil |
Não | - |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/contact/update/{contactId}',
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 => array('firstname' => 'John','lastname' => 'Doe','mobile_code' => '880','mobile' => '01988'),
CURLOPT_HTTPHEADER => array(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Atualizar Contato
Este endpoint permite atualizar um contato existente. Você só precisa enviar os campos que deseja modificar. Qualquer campo não incluído na requisição permanecerá inalterado.
Campos Obrigatórios
Os seguintes campos são obrigatórios para criar um novo contato no sistema.
| Nome | Obrigatório | Padrão |
|---|---|---|
nome |
Sim | - |
sobrenome |
Sim | - |
código_celular |
Sim | - |
celular |
Sim | - |
cidade |
Não | - |
estado |
Não | - |
cep |
Não | - |
endereço |
Não | - |
imagem_perfil |
Não | - |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/contact/delete/{contactId}',
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_POSTFIELDS => array('firstname' => 'John','lastname' => 'Doe','mobile_code' => '880','mobile' => '01988'),
CURLOPT_HTTPHEADER => array(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Excluir Contato
Este endpoint permite excluir um contato pelo seu ID único. A exclusão pode ser restrita se o contato tiver mensagens associadas ou estiver bloqueado.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/inbox/conversation-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(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Lista de Conversas
Recupere uma lista paginada de conversas do usuário autenticado, incluindo informações de contato e status da conversa.
Parâmetros de Consulta
| Nome | Descrição | Padrão |
|---|---|---|
status |
Filtre conversas por status. Use os valores abaixo para filtrar conversas por status. Done = 1; Pending = 2; Important = 3; Unread = 4; | Todos |
página |
Especifica o número da página a ser recuperada. | 1 |
paginar |
Define o número de itens retornados por página. | 20 |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/inbox/change-conversation-status/2',
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 => array('status' => '1'),
CURLOPT_HTTPHEADER => array(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Alterar Status da Conversa
Atualize o status de uma conversa como pendente, concluído ou importante. Sendo Concluído = 1, Pendente = 2, Importante = 3 e Não Lido = 4
Parâmetros de URL
| Parâmetro | Tipo | Descrição |
|---|---|---|
conversation_id |
integer | ID único da conversa |
Corpo da Requisição
| Campo | Tipo | Obrigatório |
|---|---|---|
status |
integer | YEs |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/inbox/conversation-details/2',
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_POSTFIELDS => array('status' => '1'),
CURLOPT_HTTPHEADER => array(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Detalhes da Conversa
Recupere detalhes completos de uma conversa incluindo informações de contato, notas, tags e associações de lista.
Parâmetros de URL
| Parâmetro | Tipo | Descrição |
|---|---|---|
conversation_id |
integer | ID único da conversa |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/inbox/send-message',
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 => array('mobile_code' => '880','mobile' => xxxxxxxxx','message' => 'Hello world'),
CURLOPT_HTTPHEADER => array(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Enviar Mensagem
Enviar mensagens WhatsApp para um número de celular. Este endpoint suporta texto, mídia, localização, listas interativas, URLs CTA e mensagens de e-commerce. Se nenhum contato ou conversa existente for encontrado para o número fornecido, um novo contato e conversa serão criados automaticamente.
Corpo da Requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
mobile_code |
string | yes | Código do país do celular. Deve ser um código de país numérico válido sem o sinal de mais (+). |
mobile |
string | yes | Um número de celular válido associado ao código do país fornecido. |
from_number |
string | conditional | Um número de telefone WhatsApp Business válido registrado na sua conta e no painel do Meta é necessário. Se nenhum ID for fornecido, a mensagem será enviada usando sua conta WhatsApp padrão registrada. |
message |
string | Conditional | Corpo da mensagem de texto. Obrigatório se nenhuma mídia, localização ou dados interativos forem fornecidos |
image |
file | No | Arquivo de imagem (jpg, jpeg, png – máx 5MB) |
document |
file | No | Arquivo de documento (pdf, doc, docx – máx 100MB) |
video |
file | No | Arquivo de vídeo (mp4 – máx 16MB) |
audio |
file | No | Arquivo de áudio – máx 16MB |
latitude |
decimal | Conditional | Latitude para mensagem de localização |
longitude |
decimal | Conditional | Longitude para mensagem de localização |
cta_url_id |
integer | No | ID da URL CTA para mensagens de botão interativo |
interactive_list_id |
integer | No | ID da lista interativa |
Notas
Pelo menos um tipo de mensagem deve ser fornecido.
Mensagens interativas requerem um plano ativo.
Contatos bloqueados não podem enviar ou receber mensagens.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/inbox/send-template-message',
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 => array('mobile_code' => '880','mobile' => 'xxxxxx','testmplate_id' => 'your template id'),
CURLOPT_HTTPHEADER => array(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Enviar Mensagem de Modelo
Enviar uma mensagem de modelo WhatsApp aprovado para uma conversa existente. Mensagens de modelo são comumente usadas para notificações, alertas e comunicação iniciada pela empresa.
Corpo da Requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
mobile_code |
string | yes | Código do país do celular. Deve ser um código de país numérico válido sem o sinal de mais (+). |
mobile |
string | yes | Um número de celular válido associado ao código do país fornecido. |
from_number |
string | conditional | Um número de telefone WhatsApp Business válido registrado na sua conta e no painel do Meta é necessário. Se nenhum ID for fornecido, a mensagem será enviada usando sua conta WhatsApp padrão registrada. |
template_id |
integer | Yes | ID do modelo WhatsApp aprovado |
Notas
Apenas modelos WhatsApp aprovados podem ser enviados.
Mensagens de modelo são normalmente usadas para conversas iniciadas pela empresa.
Contatos bloqueados não podem receber mensagens de modelo.
A conta WhatsApp deve estar conectada antes de enviar mensagens.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.wazime.com.br.socorreaki.com.br/extern-api/inbox/template-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(
'client-id: YOUR-CLIENT-ID',
'client-secret: YOUR-CLIENT-SECRET',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Obter Lista de Modelos
Este endpoint permite buscar todos os modelos WhatsApp associados à sua conta.