Introduction
The MemoZap 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 MemoZap 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.memozap.bigzap.com.br/external-api
Authentication
All requests to the MemoZap 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 MemoZap Dashboard under Developer Tools.
In addition to credentials, MemoZap 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 MemoZap 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.
Exemplo de Resposta de Sucesso
{
"status": "success",
"remark": "contact_list",
"message":[
"Contact list fetched successfully"
],
"data": {
...you get all data here
}
}
Exemplo de Resposta de Erro
{
"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.memozap.bigzap.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 MemoZap 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 |
pesquisar |
Pesquisa contatos por nome, sobrenome ou número de celular. | Não | - |
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.memozap.bigzap.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 MemoZap 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.memozap.bigzap.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 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.memozap.bigzap.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.memozap.bigzap.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 para o usuário autenticado, incluindo info de contato e status.
Parâmetros de Consulta
| Nome | Descrição | Padrão |
|---|---|---|
status |
Filtre conversas por status. Use os valores abaixo para filtrar via 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.memozap.bigzap.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 da conversa como pendente, concluída ou importante. Aqui Concluída = 1, Pendente = 2 e Importante = 3, Não Lida = 4
Parâmetros da 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.memozap.bigzap.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 da conversa, incluindo info de contato, notas, tags e associações de lista.
Parâmetros da 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.memozap.bigzap.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
Envie mensagens de WhatsApp. Suporta texto, mídia, localização, listas interativas, URLs de CTA e e-commerce. Se nenhum contato existir para o número, um novo será criado automaticamente.
Corpo da Requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
mobile_code |
string | yes | Código de país do celular. Deve ser numérico e 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 | É necessário um número WhatsApp Business registrado. Se nenhum ID for fornecido, a conta padrão será usada. |
message |
string | Conditional | Corpo da mensagem de texto. Obrigatório se nenhuma mídia, local 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 de URL de CTA para mensagens de botão interativo |
interactive_list_id |
integer | No | ID de lista interativa |
Notas
Pelo menos um tipo de mensagem deve ser fornecido.
Mensagens interativas exigem um plano ativo.
Contatos bloqueados não podem enviar ou receber mensagens.
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://www.memozap.bigzap.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
Envie um modelo de mensagem aprovado. Modelos são usados para notificações, alertas e comunicações iniciadas pela empresa.
Corpo da Requisição
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
mobile_code |
string | yes | Código de país do celular. Deve ser numérico e 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 | É necessário um número WhatsApp Business registrado. Se nenhum ID for fornecido, a conta padrão será usada. |
template_id |
integer | Yes | ID do modelo WhatsApp aprovado |
Notas
Apenas modelos WhatsApp aprovados podem ser enviados.
Mensagens de modelo são tipicamente 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.memozap.bigzap.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.