Create a message 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 '
{
"body_text": "<string>",
"name": "<string>",
"buttons": [
{
"text": "<string>",
"type": "<string>",
"phone_number": "<string>",
"url": "<string>"
}
],
"category": "utility",
"display_name": "<string>",
"example_variables": [
"<string>"
],
"footer_text": "<string>",
"header_format": "none",
"header_text": "<string>",
"language": "pt_BR"
}
'import requests
url = "https://api.izap.ai/api/v1/whatsapp_templates"
payload = {
"body_text": "<string>",
"name": "<string>",
"buttons": [
{
"text": "<string>",
"type": "<string>",
"phone_number": "<string>",
"url": "<string>"
}
],
"category": "utility",
"display_name": "<string>",
"example_variables": ["<string>"],
"footer_text": "<string>",
"header_format": "none",
"header_text": "<string>",
"language": "pt_BR"
}
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({
body_text: '<string>',
name: '<string>',
buttons: [
{text: '<string>', type: '<string>', phone_number: '<string>', url: '<string>'}
],
category: 'utility',
display_name: '<string>',
example_variables: ['<string>'],
footer_text: '<string>',
header_format: 'none',
header_text: '<string>',
language: 'pt_BR'
})
};
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([
'body_text' => '<string>',
'name' => '<string>',
'buttons' => [
[
'text' => '<string>',
'type' => '<string>',
'phone_number' => '<string>',
'url' => '<string>'
]
],
'category' => 'utility',
'display_name' => '<string>',
'example_variables' => [
'<string>'
],
'footer_text' => '<string>',
'header_format' => 'none',
'header_text' => '<string>',
'language' => 'pt_BR'
]),
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 \"body_text\": \"<string>\",\n \"name\": \"<string>\",\n \"buttons\": [\n {\n \"text\": \"<string>\",\n \"type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"category\": \"utility\",\n \"display_name\": \"<string>\",\n \"example_variables\": [\n \"<string>\"\n ],\n \"footer_text\": \"<string>\",\n \"header_format\": \"none\",\n \"header_text\": \"<string>\",\n \"language\": \"pt_BR\"\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 \"body_text\": \"<string>\",\n \"name\": \"<string>\",\n \"buttons\": [\n {\n \"text\": \"<string>\",\n \"type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"category\": \"utility\",\n \"display_name\": \"<string>\",\n \"example_variables\": [\n \"<string>\"\n ],\n \"footer_text\": \"<string>\",\n \"header_format\": \"none\",\n \"header_text\": \"<string>\",\n \"language\": \"pt_BR\"\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 \"body_text\": \"<string>\",\n \"name\": \"<string>\",\n \"buttons\": [\n {\n \"text\": \"<string>\",\n \"type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"category\": \"utility\",\n \"display_name\": \"<string>\",\n \"example_variables\": [\n \"<string>\"\n ],\n \"footer_text\": \"<string>\",\n \"header_format\": \"none\",\n \"header_text\": \"<string>\",\n \"language\": \"pt_BR\"\n}"
response = http.request(request)
puts response.read_body{
"body_text": "<string>",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modified": "2023-11-07T05:31:56Z",
"name": "<string>",
"status": "draft",
"buttons": [
{
"text": "<string>",
"type": "<string>",
"phone_number": "<string>",
"url": "<string>"
}
],
"category": "utility",
"display_name": "<string>",
"example_variables": [
"<string>"
],
"footer_text": "<string>",
"header_format": "none",
"header_text": "<string>",
"language": "pt_BR",
"last_synced_at": "2023-11-07T05:31:56Z",
"provider_template_id": "<string>",
"quality_score": "<string>",
"rejection_reason": "<string>"
}{
"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>"
}whatsapp-templates
Create a message template
Creates a template as a local draft. A draft cannot be used for sending until it has been submitted to Meta and approved.
POST
/
api
/
v1
/
whatsapp_templates
Create a message 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 '
{
"body_text": "<string>",
"name": "<string>",
"buttons": [
{
"text": "<string>",
"type": "<string>",
"phone_number": "<string>",
"url": "<string>"
}
],
"category": "utility",
"display_name": "<string>",
"example_variables": [
"<string>"
],
"footer_text": "<string>",
"header_format": "none",
"header_text": "<string>",
"language": "pt_BR"
}
'import requests
url = "https://api.izap.ai/api/v1/whatsapp_templates"
payload = {
"body_text": "<string>",
"name": "<string>",
"buttons": [
{
"text": "<string>",
"type": "<string>",
"phone_number": "<string>",
"url": "<string>"
}
],
"category": "utility",
"display_name": "<string>",
"example_variables": ["<string>"],
"footer_text": "<string>",
"header_format": "none",
"header_text": "<string>",
"language": "pt_BR"
}
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({
body_text: '<string>',
name: '<string>',
buttons: [
{text: '<string>', type: '<string>', phone_number: '<string>', url: '<string>'}
],
category: 'utility',
display_name: '<string>',
example_variables: ['<string>'],
footer_text: '<string>',
header_format: 'none',
header_text: '<string>',
language: 'pt_BR'
})
};
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([
'body_text' => '<string>',
'name' => '<string>',
'buttons' => [
[
'text' => '<string>',
'type' => '<string>',
'phone_number' => '<string>',
'url' => '<string>'
]
],
'category' => 'utility',
'display_name' => '<string>',
'example_variables' => [
'<string>'
],
'footer_text' => '<string>',
'header_format' => 'none',
'header_text' => '<string>',
'language' => 'pt_BR'
]),
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 \"body_text\": \"<string>\",\n \"name\": \"<string>\",\n \"buttons\": [\n {\n \"text\": \"<string>\",\n \"type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"category\": \"utility\",\n \"display_name\": \"<string>\",\n \"example_variables\": [\n \"<string>\"\n ],\n \"footer_text\": \"<string>\",\n \"header_format\": \"none\",\n \"header_text\": \"<string>\",\n \"language\": \"pt_BR\"\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 \"body_text\": \"<string>\",\n \"name\": \"<string>\",\n \"buttons\": [\n {\n \"text\": \"<string>\",\n \"type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"category\": \"utility\",\n \"display_name\": \"<string>\",\n \"example_variables\": [\n \"<string>\"\n ],\n \"footer_text\": \"<string>\",\n \"header_format\": \"none\",\n \"header_text\": \"<string>\",\n \"language\": \"pt_BR\"\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 \"body_text\": \"<string>\",\n \"name\": \"<string>\",\n \"buttons\": [\n {\n \"text\": \"<string>\",\n \"type\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"url\": \"<string>\"\n }\n ],\n \"category\": \"utility\",\n \"display_name\": \"<string>\",\n \"example_variables\": [\n \"<string>\"\n ],\n \"footer_text\": \"<string>\",\n \"header_format\": \"none\",\n \"header_text\": \"<string>\",\n \"language\": \"pt_BR\"\n}"
response = http.request(request)
puts response.read_body{
"body_text": "<string>",
"business_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"modified": "2023-11-07T05:31:56Z",
"name": "<string>",
"status": "draft",
"buttons": [
{
"text": "<string>",
"type": "<string>",
"phone_number": "<string>",
"url": "<string>"
}
],
"category": "utility",
"display_name": "<string>",
"example_variables": [
"<string>"
],
"footer_text": "<string>",
"header_format": "none",
"header_text": "<string>",
"language": "pt_BR",
"last_synced_at": "2023-11-07T05:31:56Z",
"provider_template_id": "<string>",
"quality_score": "<string>",
"rejection_reason": "<string>"
}{
"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>"
}Authorizations
Personal access token (izap_pat_…) sent as Authorization: Bearer ; dashboard session JWTs are also accepted.
Headers
Body
application/json
Required string length:
1 - 1024Required string length:
1 - 512Pattern:
^[a-z0-9_]+$Show child attributes
Show child attributes
WhatsApp/Meta template category. Drives approval rules and pricing.
Available options:
marketing, utility, authentication Maximum string length:
512Maximum string length:
60Available options:
none, text, image, video, document Maximum string length:
60Maximum string length:
10Response
Successful Response
Required string length:
1 - 1024Required string length:
1 - 512Pattern:
^[a-z0-9_]+$Lifecycle/approval status of a template.
DRAFT is local-only (not yet submitted to Meta). The remaining values mirror the statuses returned by the WhatsApp Cloud API.
Available options:
draft, pending, approved, rejected, paused, disabled Show child attributes
Show child attributes
WhatsApp/Meta template category. Drives approval rules and pricing.
Available options:
marketing, utility, authentication Maximum string length:
512Maximum string length:
60Available options:
none, text, image, video, document Maximum string length:
60Maximum string length:
10