curl -X POST \
'https://app.wizebot.com.br/api/v1/whatsapp/template/list' \
-d 'apiToken=SUA_API_KEY_AQUI' \
-d 'phone_number_id=SEU_PHONE_NUMBER_ID'
const axios = require('axios');
const data = {
apiToken: 'SUA_API_KEY_AQUI',
phone_number_id: 'SEU_PHONE_NUMBER_ID'
};
axios.post('https://app.wizebot.com.br/api/v1/whatsapp/template/list', data)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Erro:', error);
});
<?php
$url = 'https://app.wizebot.com.br/api/v1/whatsapp/template/list';
$data = array(
'apiToken' => 'SUA_API_KEY_AQUI',
'phone_number_id' => 'SEU_PHONE_NUMBER_ID'
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
?>
{
"status": "1",
"message": {
"id": 48,
"template_id": "437509121867805",
"whatsapp_business_id": 11,
"template_name": "ada",
"template_type": "single",
"locale": "en_US",
"header_type": "media",
"header_subtype": "image",
"header_content": "",
"body_content": "To send an interactive message template, make a POST call to /PHONE_NUMBER_ID/",
"footer_content": "",
"button_content": "[]",
"template_json": "{\"name\":\"template_23_1666095188\",\"language\":\"en_US\",\"category\":\"transactional\",\"components\":[{\"type\":\"header\",\"format\":\"image\",\"example\":{\"header_handle\":[\"https:\\/\\/example.com\\/assets\\/images\\/template\\/image.jpg\"]}},{\"type\":\"body\",\"text\":\"To send an interactive message template, make a POST call to \\/PHONE_NUMBER_ID\\/\"}],\"access_token\":\"EAAHFAlhZBSyEBAIRZCsHKZA5ZAdOWMRL7AwuuCBKd3tZChAQQ1PHojPUS5k76aMVyzzxG9bYp2JQ57aLMfQBCZCpvXKac4KLDZAhejOuw1zkNCxGjvK7J5YwNmZBwTTd8Iig2YDq0vGZBoS20ipsLB4scbOOh0WmQrj7oLI9ZC5rFlsFC9mYctgQKIyJCvZBfgn5pGE1YPiBllrqwZDZD\"}",
"button_type": "none",
"variable_map": "{\"header\":[],\"body\":[]}",
"updated_at": "2022-10-18 12:13:09",
"user_id": 1,
"status": "Rejected",
"system_template": "0",
"map_needed": "0",
"check_wp_type": "general"
}
}
{
"status": "0",
"message": "Invalid API Key."
}
{
"status": "0",
"message": "Missing required parameters."
}
Mensagens
Listar Modelos WhatsApp
Obter lista de modelos de mensagem do WhatsApp
POST
/
api
/
v1
/
whatsapp
/
template
/
list
curl -X POST \
'https://app.wizebot.com.br/api/v1/whatsapp/template/list' \
-d 'apiToken=SUA_API_KEY_AQUI' \
-d 'phone_number_id=SEU_PHONE_NUMBER_ID'
const axios = require('axios');
const data = {
apiToken: 'SUA_API_KEY_AQUI',
phone_number_id: 'SEU_PHONE_NUMBER_ID'
};
axios.post('https://app.wizebot.com.br/api/v1/whatsapp/template/list', data)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Erro:', error);
});
<?php
$url = 'https://app.wizebot.com.br/api/v1/whatsapp/template/list';
$data = array(
'apiToken' => 'SUA_API_KEY_AQUI',
'phone_number_id' => 'SEU_PHONE_NUMBER_ID'
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
?>
{
"status": "1",
"message": {
"id": 48,
"template_id": "437509121867805",
"whatsapp_business_id": 11,
"template_name": "ada",
"template_type": "single",
"locale": "en_US",
"header_type": "media",
"header_subtype": "image",
"header_content": "",
"body_content": "To send an interactive message template, make a POST call to /PHONE_NUMBER_ID/",
"footer_content": "",
"button_content": "[]",
"template_json": "{\"name\":\"template_23_1666095188\",\"language\":\"en_US\",\"category\":\"transactional\",\"components\":[{\"type\":\"header\",\"format\":\"image\",\"example\":{\"header_handle\":[\"https:\\/\\/example.com\\/assets\\/images\\/template\\/image.jpg\"]}},{\"type\":\"body\",\"text\":\"To send an interactive message template, make a POST call to \\/PHONE_NUMBER_ID\\/\"}],\"access_token\":\"EAAHFAlhZBSyEBAIRZCsHKZA5ZAdOWMRL7AwuuCBKd3tZChAQQ1PHojPUS5k76aMVyzzxG9bYp2JQ57aLMfQBCZCpvXKac4KLDZAhejOuw1zkNCxGjvK7J5YwNmZBwTTd8Iig2YDq0vGZBoS20ipsLB4scbOOh0WmQrj7oLI9ZC5rFlsFC9mYctgQKIyJCvZBfgn5pGE1YPiBllrqwZDZD\"}",
"button_type": "none",
"variable_map": "{\"header\":[],\"body\":[]}",
"updated_at": "2022-10-18 12:13:09",
"user_id": 1,
"status": "Rejected",
"system_template": "0",
"map_needed": "0",
"check_wp_type": "general"
}
}
{
"status": "0",
"message": "Invalid API Key."
}
{
"status": "0",
"message": "Missing required parameters."
}
Listar Modelos de Mensagem
Esta API permite obter a lista de modelos de mensagem disponíveis para sua conta do WhatsApp Business.Modelos de Mensagem
Os modelos de mensagem são formatos pré-aprovados pelo WhatsApp que permitem enviar mensagens fora da janela de 24 horas. Eles são essenciais para campanhas de marketing, notificações e comunicações programadas.Endpoint da API
Parâmetros
string
required
Sua chave de API
string
required
Número de telefone da conta do WhatsApp ID
Exemplo de Solicitação
curl -X POST \
'https://app.wizebot.com.br/api/v1/whatsapp/template/list' \
-d 'apiToken=API-KEY' \
-d 'phone_number_id=PHONE-NUMBER-ID'
Exemplo de Resposta
{
"status": "1",
"message": {
"id": 48,
"template_id": "437509121867805",
"whatsapp_business_id": 11,
"template_name": "ada",
"template_type": "single",
"locale": "en_US",
"header_type": "media",
"header_subtype": "image",
"header_content": "",
"body_content": "To send an interactive message template, make a POST call to /PHONE_NUMBER_ID/",
"footer_content": "",
"button_content": "[]",
"template_json": "{\"name\":\"template_23_1666095188\",\"language\":\"en_US\",\"category\":\"transactional\",\"components\":[{\"type\":\"header\",\"format\":\"image\",\"example\":{\"header_handle\":[\"https:\\/\\/example.com\\/assets\\/images\\/template\\/image.jpg\"]}},{\"type\":\"body\",\"text\":\"To send an interactive message template, make a POST call to \\/PHONE_NUMBER_ID\\/\"}],\"access_token\":\"EAAHFAlhZBSyEBAIRZCsHKZA5ZAdOWMRL7AwuuCBKd3tZChAQQ1PHojPUS5k76aMVyzzxG9bYp2JQ57aLMfQBCZCpvXKac4KLDZAhejOuw1zkNCxGjvK7J5YwNmZBwTTd8Iig2YDq0vGZBoS20ipsLB4scbOOh0WmQrj7oLI9ZC5rFlsFC9mYctgQKIyJCvZBfgn5pGE1YPiBllrqwZDZD\"}",
"button_type": "none",
"variable_map": "{\"header\":[],\"body\":[]}",
"updated_at": "2022-10-18 12:13:09",
"user_id": 1,
"status": "Rejected",
"system_template": "0",
"map_needed": "0",
"check_wp_type": "general"
}
}
{
"status": "0",
"message": "Invalid API Key."
}
Teste a API
Para testar esta API, você precisará de sua chave API (apiToken) que pode ser encontrada no painel da WizeBot em Configurações > API.
curl -X POST \
'https://app.wizebot.com.br/api/v1/whatsapp/template/list' \
-d 'apiToken=SUA_API_KEY_AQUI' \
-d 'phone_number_id=SEU_PHONE_NUMBER_ID'
const axios = require('axios');
const data = {
apiToken: 'SUA_API_KEY_AQUI',
phone_number_id: 'SEU_PHONE_NUMBER_ID'
};
axios.post('https://app.wizebot.com.br/api/v1/whatsapp/template/list', data)
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Erro:', error);
});
<?php
$url = 'https://app.wizebot.com.br/api/v1/whatsapp/template/list';
$data = array(
'apiToken' => 'SUA_API_KEY_AQUI',
'phone_number_id' => 'SEU_PHONE_NUMBER_ID'
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
echo $result;
?>
{
"status": "1",
"message": {
"id": 48,
"template_id": "437509121867805",
"whatsapp_business_id": 11,
"template_name": "ada",
"template_type": "single",
"locale": "en_US",
"header_type": "media",
"header_subtype": "image",
"header_content": "",
"body_content": "To send an interactive message template, make a POST call to /PHONE_NUMBER_ID/",
"footer_content": "",
"button_content": "[]",
"template_json": "{\"name\":\"template_23_1666095188\",\"language\":\"en_US\",\"category\":\"transactional\",\"components\":[{\"type\":\"header\",\"format\":\"image\",\"example\":{\"header_handle\":[\"https:\\/\\/example.com\\/assets\\/images\\/template\\/image.jpg\"]}},{\"type\":\"body\",\"text\":\"To send an interactive message template, make a POST call to \\/PHONE_NUMBER_ID\\/\"}],\"access_token\":\"EAAHFAlhZBSyEBAIRZCsHKZA5ZAdOWMRL7AwuuCBKd3tZChAQQ1PHojPUS5k76aMVyzzxG9bYp2JQ57aLMfQBCZCpvXKac4KLDZAhejOuw1zkNCxGjvK7J5YwNmZBwTTd8Iig2YDq0vGZBoS20ipsLB4scbOOh0WmQrj7oLI9ZC5rFlsFC9mYctgQKIyJCvZBfgn5pGE1YPiBllrqwZDZD\"}",
"button_type": "none",
"variable_map": "{\"header\":[],\"body\":[]}",
"updated_at": "2022-10-18 12:13:09",
"user_id": 1,
"status": "Rejected",
"system_template": "0",
"map_needed": "0",
"check_wp_type": "general"
}
}
{
"status": "0",
"message": "Invalid API Key."
}
{
"status": "0",
"message": "Missing required parameters."
}
⌘I

