Sync template status from Meta
curl --request POST \
--url https://api.izap.ai/api/v1/whatsapp_templates/sync \
--header 'Authorization: Bearer <token>' \
--header 'business-id: <business-id>'import requests
url = "https://api.izap.ai/api/v1/whatsapp_templates/sync"
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'business-id': '<business-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.izap.ai/api/v1/whatsapp_templates/sync', 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/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.izap.ai/api/v1/whatsapp_templates/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("business-id", "<business-id>")
req.Header.Add("Authorization", "Bearer <token>")
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/sync")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/whatsapp_templates/sync")
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>'
response = http.request(request)
puts response.read_body{
"created": 123,
"message": "<string>",
"synced": 123,
"updated": 123,
"unchanged": 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>"
}whatsapp-templates
Sync template status from Meta
Pulls the current review status of the business’s templates from Meta and updates the stored copies, so templates approved or rejected on Meta’s side become visible here.
POST
/
api
/
v1
/
whatsapp_templates
/
sync
Sync template status from Meta
curl --request POST \
--url https://api.izap.ai/api/v1/whatsapp_templates/sync \
--header 'Authorization: Bearer <token>' \
--header 'business-id: <business-id>'import requests
url = "https://api.izap.ai/api/v1/whatsapp_templates/sync"
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'business-id': '<business-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.izap.ai/api/v1/whatsapp_templates/sync', 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/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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"
"net/http"
"io"
)
func main() {
url := "https://api.izap.ai/api/v1/whatsapp_templates/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("business-id", "<business-id>")
req.Header.Add("Authorization", "Bearer <token>")
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/sync")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/whatsapp_templates/sync")
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>'
response = http.request(request)
puts response.read_body{
"created": 123,
"message": "<string>",
"synced": 123,
"updated": 123,
"unchanged": 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.