Create a draft WhatsApp template
curl --request POST \
--url https://api.izap.ai/api/v1/whatsapp_templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'business-id: <business-id>' \
--data '
{
"display_name": "<string>",
"language": "<string>",
"body_text": "<string>",
"category": "<string>",
"header_text": "<string>",
"footer_text": "<string>",
"twilio_content_sid": "<string>"
}
'import requests
url = "https://api.izap.ai/api/v1/whatsapp_templates"
payload = {
"display_name": "<string>",
"language": "<string>",
"body_text": "<string>",
"category": "<string>",
"header_text": "<string>",
"footer_text": "<string>",
"twilio_content_sid": "<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({
display_name: '<string>',
language: '<string>',
body_text: '<string>',
category: '<string>',
header_text: '<string>',
footer_text: '<string>',
twilio_content_sid: '<string>'
})
};
fetch('https://api.izap.ai/api/v1/whatsapp_templates', 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/whatsapp_templates",
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([
'display_name' => '<string>',
'language' => '<string>',
'body_text' => '<string>',
'category' => '<string>',
'header_text' => '<string>',
'footer_text' => '<string>',
'twilio_content_sid' => '<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/whatsapp_templates"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"language\": \"<string>\",\n \"body_text\": \"<string>\",\n \"category\": \"<string>\",\n \"header_text\": \"<string>\",\n \"footer_text\": \"<string>\",\n \"twilio_content_sid\": \"<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/whatsapp_templates")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"language\": \"<string>\",\n \"body_text\": \"<string>\",\n \"category\": \"<string>\",\n \"header_text\": \"<string>\",\n \"footer_text\": \"<string>\",\n \"twilio_content_sid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/whatsapp_templates")
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 \"display_name\": \"<string>\",\n \"language\": \"<string>\",\n \"body_text\": \"<string>\",\n \"category\": \"<string>\",\n \"header_text\": \"<string>\",\n \"footer_text\": \"<string>\",\n \"twilio_content_sid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "t1a2b3c4-1234-4a5b-9c8d-abcdef123456",
"business_id": "6a1f2e2e-1c34-4e2a-9c3e-1234567890ab",
"display_name": "order_confirmation",
"language": "pt_BR",
"status": "DRAFT",
"body_text": "Seu pedido {{1}} foi confirmado!"
}{
"detail": "Not authenticated"
}WhatsApp Templates
Create a draft WhatsApp template
POST
/
api
/
v1
/
whatsapp_templates
Create a draft WhatsApp template
curl --request POST \
--url https://api.izap.ai/api/v1/whatsapp_templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'business-id: <business-id>' \
--data '
{
"display_name": "<string>",
"language": "<string>",
"body_text": "<string>",
"category": "<string>",
"header_text": "<string>",
"footer_text": "<string>",
"twilio_content_sid": "<string>"
}
'import requests
url = "https://api.izap.ai/api/v1/whatsapp_templates"
payload = {
"display_name": "<string>",
"language": "<string>",
"body_text": "<string>",
"category": "<string>",
"header_text": "<string>",
"footer_text": "<string>",
"twilio_content_sid": "<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({
display_name: '<string>',
language: '<string>',
body_text: '<string>',
category: '<string>',
header_text: '<string>',
footer_text: '<string>',
twilio_content_sid: '<string>'
})
};
fetch('https://api.izap.ai/api/v1/whatsapp_templates', 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/whatsapp_templates",
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([
'display_name' => '<string>',
'language' => '<string>',
'body_text' => '<string>',
'category' => '<string>',
'header_text' => '<string>',
'footer_text' => '<string>',
'twilio_content_sid' => '<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/whatsapp_templates"
payload := strings.NewReader("{\n \"display_name\": \"<string>\",\n \"language\": \"<string>\",\n \"body_text\": \"<string>\",\n \"category\": \"<string>\",\n \"header_text\": \"<string>\",\n \"footer_text\": \"<string>\",\n \"twilio_content_sid\": \"<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/whatsapp_templates")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"display_name\": \"<string>\",\n \"language\": \"<string>\",\n \"body_text\": \"<string>\",\n \"category\": \"<string>\",\n \"header_text\": \"<string>\",\n \"footer_text\": \"<string>\",\n \"twilio_content_sid\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/whatsapp_templates")
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 \"display_name\": \"<string>\",\n \"language\": \"<string>\",\n \"body_text\": \"<string>\",\n \"category\": \"<string>\",\n \"header_text\": \"<string>\",\n \"footer_text\": \"<string>\",\n \"twilio_content_sid\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "t1a2b3c4-1234-4a5b-9c8d-abcdef123456",
"business_id": "6a1f2e2e-1c34-4e2a-9c3e-1234567890ab",
"display_name": "order_confirmation",
"language": "pt_BR",
"status": "DRAFT",
"body_text": "Seu pedido {{1}} foi confirmado!"
}{
"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
Maximum string length:
512Maximum string length:
10Required string length:
1 - 1024Maximum string length:
60Maximum string length:
60Maximum string length:
64⌘I