Preview a transmission from a CSV recipient list
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>",
"template_name": "<string>",
"template_language": "<string>",
"recipients": [
{}
],
"phone_column": "<string>",
"transmission_type": "whatsapp_template",
"max_messages_per_minute": 60,
"variable_columns": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
'import requests
url = "https://api.izap.ai/api/v1/transmissions/preview"
payload = {
"name": "<string>",
"template_name": "<string>",
"template_language": "<string>",
"recipients": [{}],
"phone_column": "<string>",
"transmission_type": "whatsapp_template",
"max_messages_per_minute": 60,
"variable_columns": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"timezone": "<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>',
template_name: '<string>',
template_language: '<string>',
recipients: [{}],
phone_column: '<string>',
transmission_type: 'whatsapp_template',
max_messages_per_minute: 60,
variable_columns: {},
scheduled_at: '2023-11-07T05:31:56Z',
timezone: '<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>',
'template_name' => '<string>',
'template_language' => '<string>',
'recipients' => [
[
]
],
'phone_column' => '<string>',
'transmission_type' => 'whatsapp_template',
'max_messages_per_minute' => 60,
'variable_columns' => [
],
'scheduled_at' => '2023-11-07T05:31:56Z',
'timezone' => '<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 \"template_name\": \"<string>\",\n \"template_language\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"phone_column\": \"<string>\",\n \"transmission_type\": \"whatsapp_template\",\n \"max_messages_per_minute\": 60,\n \"variable_columns\": {},\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\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 \"template_name\": \"<string>\",\n \"template_language\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"phone_column\": \"<string>\",\n \"transmission_type\": \"whatsapp_template\",\n \"max_messages_per_minute\": 60,\n \"variable_columns\": {},\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\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 \"template_name\": \"<string>\",\n \"template_language\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"phone_column\": \"<string>\",\n \"transmission_type\": \"whatsapp_template\",\n \"max_messages_per_minute\": 60,\n \"variable_columns\": {},\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"transmission_id": "tr1a2b3c-1234-4a5b-9c8d-abcdef123456",
"name": "July promo",
"status": "draft",
"transmission_type": "whatsapp_template",
"template_name": "order_confirmation",
"template_language": "pt_BR",
"recipient_count": 100,
"valid_count": 98,
"invalid_count": 2,
"duplicate_count": 0,
"estimated_duration_seconds": 60
}{
"detail": "Not authenticated"
}Transmissions
Preview a transmission from a CSV recipient list
Validates recipients against a template’s variables, creating a DRAFT transmission. No messages are sent until the draft is confirmed.
POST
/
api
/
v1
/
transmissions
/
preview
Preview a transmission from a CSV recipient list
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>",
"template_name": "<string>",
"template_language": "<string>",
"recipients": [
{}
],
"phone_column": "<string>",
"transmission_type": "whatsapp_template",
"max_messages_per_minute": 60,
"variable_columns": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"timezone": "<string>"
}
'import requests
url = "https://api.izap.ai/api/v1/transmissions/preview"
payload = {
"name": "<string>",
"template_name": "<string>",
"template_language": "<string>",
"recipients": [{}],
"phone_column": "<string>",
"transmission_type": "whatsapp_template",
"max_messages_per_minute": 60,
"variable_columns": {},
"scheduled_at": "2023-11-07T05:31:56Z",
"timezone": "<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>',
template_name: '<string>',
template_language: '<string>',
recipients: [{}],
phone_column: '<string>',
transmission_type: 'whatsapp_template',
max_messages_per_minute: 60,
variable_columns: {},
scheduled_at: '2023-11-07T05:31:56Z',
timezone: '<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>',
'template_name' => '<string>',
'template_language' => '<string>',
'recipients' => [
[
]
],
'phone_column' => '<string>',
'transmission_type' => 'whatsapp_template',
'max_messages_per_minute' => 60,
'variable_columns' => [
],
'scheduled_at' => '2023-11-07T05:31:56Z',
'timezone' => '<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 \"template_name\": \"<string>\",\n \"template_language\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"phone_column\": \"<string>\",\n \"transmission_type\": \"whatsapp_template\",\n \"max_messages_per_minute\": 60,\n \"variable_columns\": {},\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\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 \"template_name\": \"<string>\",\n \"template_language\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"phone_column\": \"<string>\",\n \"transmission_type\": \"whatsapp_template\",\n \"max_messages_per_minute\": 60,\n \"variable_columns\": {},\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\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 \"template_name\": \"<string>\",\n \"template_language\": \"<string>\",\n \"recipients\": [\n {}\n ],\n \"phone_column\": \"<string>\",\n \"transmission_type\": \"whatsapp_template\",\n \"max_messages_per_minute\": 60,\n \"variable_columns\": {},\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"transmission_id": "tr1a2b3c-1234-4a5b-9c8d-abcdef123456",
"name": "July promo",
"status": "draft",
"transmission_type": "whatsapp_template",
"template_name": "order_confirmation",
"template_language": "pt_BR",
"recipient_count": 100,
"valid_count": 98,
"invalid_count": 2,
"duplicate_count": 0,
"estimated_duration_seconds": 60
}{
"detail": "Not authenticated"
}Autorizações
JWT access token obtained from POST /api/v1/auth/jwt/login, the OAuth token endpoint, or a business-scoped API token. Some Business/Chat/Template/Scheduling endpoints alternatively accept HTTP Basic credentials scoped to the business slug.
Cabeçalhos
Corpo
application/json
Required string length:
1 - 255Parsed CSV rows (column header -> value).
Show child attributes
Show child attributes
Opções disponíveis:
whatsapp_template Intervalo obrigatório:
1 <= x <= 200Show child attributes
Show child attributes
Resposta
Draft transmission preview.
Exemplo:
"draft"
⌘I