curl --request POST \
--url https://api.izap.ai/api/v1/transmissions/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'business-id: <business-id>' \
--data '
{
"name": "<string>",
"recipients": [
{}
],
"template_name": "<string>",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_messages_per_minute": 60,
"phone_column": "phone",
"scheduled_at": "2023-11-07T05:31:56Z",
"template_language": "pt_BR",
"timezone": "America/Sao_Paulo",
"transmission_type": "whatsapp_template",
"variable_columns": [
"<string>"
]
}
'import requests
url = "https://api.izap.ai/api/v1/transmissions/preview"
payload = {
"name": "<string>",
"recipients": [{}],
"template_name": "<string>",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_messages_per_minute": 60,
"phone_column": "phone",
"scheduled_at": "2023-11-07T05:31:56Z",
"template_language": "pt_BR",
"timezone": "America/Sao_Paulo",
"transmission_type": "whatsapp_template",
"variable_columns": ["<string>"]
}
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'business-id': '<business-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
recipients: [{}],
template_name: '<string>',
business_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
max_messages_per_minute: 60,
phone_column: 'phone',
scheduled_at: '2023-11-07T05:31:56Z',
template_language: 'pt_BR',
timezone: 'America/Sao_Paulo',
transmission_type: 'whatsapp_template',
variable_columns: ['<string>']
})
};
fetch('https://api.izap.ai/api/v1/transmissions/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.izap.ai/api/v1/transmissions/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'recipients' => [
[
]
],
'template_name' => '<string>',
'business_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'max_messages_per_minute' => 60,
'phone_column' => 'phone',
'scheduled_at' => '2023-11-07T05:31:56Z',
'template_language' => 'pt_BR',
'timezone' => 'America/Sao_Paulo',
'transmission_type' => 'whatsapp_template',
'variable_columns' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"business-id: <business-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.izap.ai/api/v1/transmissions/preview"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"template_name\": \"<string>\",\n \"business_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_messages_per_minute\": 60,\n \"phone_column\": \"phone\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"template_language\": \"pt_BR\",\n \"timezone\": \"America/Sao_Paulo\",\n \"transmission_type\": \"whatsapp_template\",\n \"variable_columns\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("business-id", "<business-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.izap.ai/api/v1/transmissions/preview")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"template_name\": \"<string>\",\n \"business_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_messages_per_minute\": 60,\n \"phone_column\": \"phone\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"template_language\": \"pt_BR\",\n \"timezone\": \"America/Sao_Paulo\",\n \"transmission_type\": \"whatsapp_template\",\n \"variable_columns\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/transmissions/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"template_name\": \"<string>\",\n \"business_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_messages_per_minute\": 60,\n \"phone_column\": \"phone\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"template_language\": \"pt_BR\",\n \"timezone\": \"America/Sao_Paulo\",\n \"transmission_type\": \"whatsapp_template\",\n \"variable_columns\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"column_mapping": {},
"duplicate_count": 123,
"estimated_duration_seconds": 123,
"invalid_count": 123,
"name": "<string>",
"phone_column": "<string>",
"recipient_count": 123,
"sample_errors": [
{
"error": "<string>",
"phone": "<string>",
"row_index": 123
}
],
"scheduled_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"template_language": "<string>",
"template_name": "<string>",
"transmission_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transmission_type": "<string>",
"uses_named_variables": true,
"valid_count": 123,
"warnings": [
"<string>"
],
"not_on_whatsapp_count": 0
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}Preview a transmission
Validates the recipient list and template and stores the result as a draft, without sending anything. Review the draft, then confirm it to dispatch.
curl --request POST \
--url https://api.izap.ai/api/v1/transmissions/preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'business-id: <business-id>' \
--data '
{
"name": "<string>",
"recipients": [
{}
],
"template_name": "<string>",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_messages_per_minute": 60,
"phone_column": "phone",
"scheduled_at": "2023-11-07T05:31:56Z",
"template_language": "pt_BR",
"timezone": "America/Sao_Paulo",
"transmission_type": "whatsapp_template",
"variable_columns": [
"<string>"
]
}
'import requests
url = "https://api.izap.ai/api/v1/transmissions/preview"
payload = {
"name": "<string>",
"recipients": [{}],
"template_name": "<string>",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_messages_per_minute": 60,
"phone_column": "phone",
"scheduled_at": "2023-11-07T05:31:56Z",
"template_language": "pt_BR",
"timezone": "America/Sao_Paulo",
"transmission_type": "whatsapp_template",
"variable_columns": ["<string>"]
}
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'business-id': '<business-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
recipients: [{}],
template_name: '<string>',
business_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
max_messages_per_minute: 60,
phone_column: 'phone',
scheduled_at: '2023-11-07T05:31:56Z',
template_language: 'pt_BR',
timezone: 'America/Sao_Paulo',
transmission_type: 'whatsapp_template',
variable_columns: ['<string>']
})
};
fetch('https://api.izap.ai/api/v1/transmissions/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.izap.ai/api/v1/transmissions/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'recipients' => [
[
]
],
'template_name' => '<string>',
'business_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'max_messages_per_minute' => 60,
'phone_column' => 'phone',
'scheduled_at' => '2023-11-07T05:31:56Z',
'template_language' => 'pt_BR',
'timezone' => 'America/Sao_Paulo',
'transmission_type' => 'whatsapp_template',
'variable_columns' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"business-id: <business-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.izap.ai/api/v1/transmissions/preview"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"template_name\": \"<string>\",\n \"business_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_messages_per_minute\": 60,\n \"phone_column\": \"phone\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"template_language\": \"pt_BR\",\n \"timezone\": \"America/Sao_Paulo\",\n \"transmission_type\": \"whatsapp_template\",\n \"variable_columns\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("business-id", "<business-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.izap.ai/api/v1/transmissions/preview")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"template_name\": \"<string>\",\n \"business_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_messages_per_minute\": 60,\n \"phone_column\": \"phone\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"template_language\": \"pt_BR\",\n \"timezone\": \"America/Sao_Paulo\",\n \"transmission_type\": \"whatsapp_template\",\n \"variable_columns\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/transmissions/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"template_name\": \"<string>\",\n \"business_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_messages_per_minute\": 60,\n \"phone_column\": \"phone\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"template_language\": \"pt_BR\",\n \"timezone\": \"America/Sao_Paulo\",\n \"transmission_type\": \"whatsapp_template\",\n \"variable_columns\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"column_mapping": {},
"duplicate_count": 123,
"estimated_duration_seconds": 123,
"invalid_count": 123,
"name": "<string>",
"phone_column": "<string>",
"recipient_count": 123,
"sample_errors": [
{
"error": "<string>",
"phone": "<string>",
"row_index": 123
}
],
"scheduled_at": "2023-11-07T05:31:56Z",
"status": "<string>",
"template_language": "<string>",
"template_name": "<string>",
"transmission_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transmission_type": "<string>",
"uses_named_variables": true,
"valid_count": 123,
"warnings": [
"<string>"
],
"not_on_whatsapp_count": 0
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}Autorizações
Personal access token (izap_pat_…) sent as Authorization: Bearer ; dashboard session JWTs are also accepted.
Cabeçalhos
Corpo
Validate CSV recipients against a template and create a DRAFT transmission.
No messages are sent. recipients are parsed CSV rows (header -> value); each
row must contain phone_column and the columns that fill the template's
variables. Confirm the returned draft id with confirm_transmission to send.
Human label for the transmission.
1 - 255Parsed CSV rows; each row maps a string column header to its string cell value. Must include the phone column and the columns that supply the template's variables.
1 - 5000 elementsShow child attributes
Show child attributes
Name of the pre-approved WhatsApp Cloud API template to send.
1 - 512Sending pace cap. Must be between 1 and 200 messages per minute.
1 <= x <= 200Name of the CSV column holding the recipient phone number (E.164 or local).
1 - 255When to send. Omit or null to send immediately on confirm. If the value has no timezone offset it is interpreted in 'timezone'.
Template language/locale code as registered with Meta, e.g. 'pt_BR'.
2 - 15IANA timezone used to interpret a naive 'scheduled_at'.
Only 'whatsapp_template' is supported for now.
"whatsapp_template"For positional templates ({{1}}, {{2}}, ...): the ordered CSV header names mapping to {{1}}, {{2}}, ... If omitted, the first non-phone columns are used in order. Ignored for templates with named placeholders.
50Resposta
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes