curl -X POST https://zapclass.com.br/api/messages/image \
-H "Content-Type: application/json" \
-H "Authorization: Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP" \
-d '{
"number": "5511999999999",
"file": "https://placehold.co/600x400.png",
"message": "Veja essa imagem aqui",
"delay": 3000,
"forward": true,
"message_repy_id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"message_source": "typebot",
"message_id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"mentions": "5511999999999,5511888888888",
"read": true,
"read_messages": true
}'
const response = await fetch("https://zapclass.com.br/api/messages/image", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP",
},
body: JSON.stringify({
number: "5511999999999",
file: "https://placehold.co/600x400.png",
message: "Veja essa imagem aqui",
delay: 3000,
forward: true,
message_repy_id: "5511999999999:1AB2C3DEFG4H56I78JKL9M",
message_source: "typebot",
message_id: "5511999999999:1AB2C3DEFG4H56I78JKL9M",
mentions: "5511999999999,5511888888888",
read: true,
read_messages: true,
}),
});
<?php
$ch = curl_init('https://zapclass.com.br/api/messages/image');
$payload = [
"number" => "5511999999999",
"file" => "https://placehold.co/600x400.png",
"message" => "Veja essa imagem aqui",
"delay" => 3000,
"forward" => true,
"message_repy_id" => "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"message_source" => "typebot",
"message_id" => "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"mentions" => "5511999999999,5511888888888",
"read" => true,
"read_messages" => true
];
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
?>
{
"success": true,
"id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"chat_id": "5511999999999@s.whatsapp.net"
}
{
"success": false,
"message": "Token de autenticação inválido"
}
Mensagens
Enviar Imagem
Enviar mensagem de imagem
POST
/
messages
/
image
curl -X POST https://zapclass.com.br/api/messages/image \
-H "Content-Type: application/json" \
-H "Authorization: Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP" \
-d '{
"number": "5511999999999",
"file": "https://placehold.co/600x400.png",
"message": "Veja essa imagem aqui",
"delay": 3000,
"forward": true,
"message_repy_id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"message_source": "typebot",
"message_id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"mentions": "5511999999999,5511888888888",
"read": true,
"read_messages": true
}'
const response = await fetch("https://zapclass.com.br/api/messages/image", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP",
},
body: JSON.stringify({
number: "5511999999999",
file: "https://placehold.co/600x400.png",
message: "Veja essa imagem aqui",
delay: 3000,
forward: true,
message_repy_id: "5511999999999:1AB2C3DEFG4H56I78JKL9M",
message_source: "typebot",
message_id: "5511999999999:1AB2C3DEFG4H56I78JKL9M",
mentions: "5511999999999,5511888888888",
read: true,
read_messages: true,
}),
});
<?php
$ch = curl_init('https://zapclass.com.br/api/messages/image');
$payload = [
"number" => "5511999999999",
"file" => "https://placehold.co/600x400.png",
"message" => "Veja essa imagem aqui",
"delay" => 3000,
"forward" => true,
"message_repy_id" => "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"message_source" => "typebot",
"message_id" => "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"mentions" => "5511999999999,5511888888888",
"read" => true,
"read_messages" => true
];
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
?>
{
"success": true,
"id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"chat_id": "5511999999999@s.whatsapp.net"
}
{
"success": false,
"message": "Token de autenticação inválido"
}
Tipos de arquivos suportados
- JPEG (.jpeg) - até 5 MB
- PNG (.png) - até 5 MB
Authorization
string
required
Chave de autenticação da sua conexão, utilizada no header Authorization como
Bearer Token.
Você encontra sua API Key no botão API da sua conexão no painel ZapClass.
A chave sempre começa com o prefixo
Exemplo:
Você encontra sua API Key no botão API da sua conexão no painel ZapClass.
A chave sempre começa com o prefixo
zc_. Exemplo:
zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aPBody Parameters
string
required
Número do destinatário no formato internacional.
Deve incluir código do país DDI + DDD + número.
Exemplo:
Deve incluir código do país DDI + DDD + número.
Exemplo:
5511999999999string
required
URL ou Base64da do arquivo enviado.
Exemplo:
Exemplo:
https://placehold.co/600x400.pngstring
Conteúdo da mensagem de texto a ser enviada.
Suporta texto simples, emojis e caracteres especiais.
Exemplo:
Suporta texto simples, emojis e caracteres especiais.
Exemplo:
Olá! Bem-vindo à nossa plataforma ZapClassinteger
Atraso em milissegundos antes do envio (agendamento).
Útil para envios programados ou intervalos entre mensagens.
Aparecerá “Digitando…” antes do envio.
Exemplo:
Útil para envios programados ou intervalos entre mensagens.
Aparecerá “Digitando…” antes do envio.
Exemplo:
3000boolean
Marca a mensagem como encaminhada para o destinatário.
Exemplo:
Exemplo:
truestring
Identificador da mensagem para responder.
Exemplo:
Exemplo:
5511999999999:1AB2C3DEFG4H56I78JKL9Mstring
Origem do envio da mensagem.
Normalmente usado para rastreamento da mensagem.
Exemplo:
Normalmente usado para rastreamento da mensagem.
Exemplo:
typebotstring
Identificador do envio da mensagem.
Combinado com o
Exemplo:
Combinado com o
message_source pode ser usado para rastreamento. Exemplo:
5511999999999:1AB2C3DEFG4H56I78JKL9Mstring
Relação de números de telefone a serem mencionados na mensagem.
O números devem ser separads por vírgula.
Exemplo:
O números devem ser separads por vírgula.
Exemplo:
5511999999999,5511888888888boolean
Marca a conversa como lida após o envio.
Exemplo:
Exemplo:
trueboolean
Marca as últimas mensagens como lidas após o envio.
Exemplo:
Exemplo:
truecurl -X POST https://zapclass.com.br/api/messages/image \
-H "Content-Type: application/json" \
-H "Authorization: Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP" \
-d '{
"number": "5511999999999",
"file": "https://placehold.co/600x400.png",
"message": "Veja essa imagem aqui",
"delay": 3000,
"forward": true,
"message_repy_id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"message_source": "typebot",
"message_id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"mentions": "5511999999999,5511888888888",
"read": true,
"read_messages": true
}'
const response = await fetch("https://zapclass.com.br/api/messages/image", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP",
},
body: JSON.stringify({
number: "5511999999999",
file: "https://placehold.co/600x400.png",
message: "Veja essa imagem aqui",
delay: 3000,
forward: true,
message_repy_id: "5511999999999:1AB2C3DEFG4H56I78JKL9M",
message_source: "typebot",
message_id: "5511999999999:1AB2C3DEFG4H56I78JKL9M",
mentions: "5511999999999,5511888888888",
read: true,
read_messages: true,
}),
});
<?php
$ch = curl_init('https://zapclass.com.br/api/messages/image');
$payload = [
"number" => "5511999999999",
"file" => "https://placehold.co/600x400.png",
"message" => "Veja essa imagem aqui",
"delay" => 3000,
"forward" => true,
"message_repy_id" => "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"message_source" => "typebot",
"message_id" => "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"mentions" => "5511999999999,5511888888888",
"read" => true,
"read_messages" => true
];
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'Authorization: Bearer zc_6FrX2qjM4bHT9pR6cC0sD8wLkG3nE2tZfV5uN1aP'
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_exec($ch);
curl_close($ch);
?>
{
"success": true,
"id": "5511999999999:1AB2C3DEFG4H56I78JKL9M",
"chat_id": "5511999999999@s.whatsapp.net"
}
{
"success": false,
"message": "Token de autenticação inválido"
}
⌘I

