curl --request POST \
--url https://api.ciarem.ai/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"language": "<string>",
"components": [
{}
],
"catalog_send_defaults": {}
}
'import requests
url = "https://api.ciarem.ai/v1/templates"
payload = {
"name": "<string>",
"language": "<string>",
"components": [{}],
"catalog_send_defaults": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
language: '<string>',
components: [{}],
catalog_send_defaults: {}
})
};
fetch('https://api.ciarem.ai/v1/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.ciarem.ai/v1/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([
'name' => '<string>',
'language' => '<string>',
'components' => [
[
]
],
'catalog_send_defaults' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.ciarem.ai/v1/templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {}\n ],\n \"catalog_send_defaults\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.ciarem.ai/v1/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {}\n ],\n \"catalog_send_defaults\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ciarem.ai/v1/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {}\n ],\n \"catalog_send_defaults\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"waba_id": "<string>",
"meta_template_id": "<string>",
"name": "<string>",
"language": "<string>",
"category": "MARKETING",
"status": "DRAFT",
"components": [
{}
],
"catalog_send_defaults": {},
"rejected_reason": "<string>",
"quality_rating": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": "<string>"
}Create and submit a template
Create the template and submit it to Meta for approval in one call.
Returns 201 with status: "PENDING"; Meta’s review then flips it to
APPROVED or REJECTED asynchronously (poll GET /v1/templates/{id}). Nothing
persists if Meta rejects the payload outright — that is a 422 meta_rejected
carrying Meta’s own reason, not a stranded draft.
curl --request POST \
--url https://api.ciarem.ai/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"language": "<string>",
"components": [
{}
],
"catalog_send_defaults": {}
}
'import requests
url = "https://api.ciarem.ai/v1/templates"
payload = {
"name": "<string>",
"language": "<string>",
"components": [{}],
"catalog_send_defaults": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
language: '<string>',
components: [{}],
catalog_send_defaults: {}
})
};
fetch('https://api.ciarem.ai/v1/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.ciarem.ai/v1/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([
'name' => '<string>',
'language' => '<string>',
'components' => [
[
]
],
'catalog_send_defaults' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.ciarem.ai/v1/templates"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {}\n ],\n \"catalog_send_defaults\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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.ciarem.ai/v1/templates")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {}\n ],\n \"catalog_send_defaults\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ciarem.ai/v1/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"language\": \"<string>\",\n \"components\": [\n {}\n ],\n \"catalog_send_defaults\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"waba_id": "<string>",
"meta_template_id": "<string>",
"name": "<string>",
"language": "<string>",
"category": "MARKETING",
"status": "DRAFT",
"components": [
{}
],
"catalog_send_defaults": {},
"rejected_reason": "<string>",
"quality_rating": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"code": "<string>",
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
An org API key: Authorization: Bearer oak_….
Body
Create + submit for approval in one call.
Patterns mirror the internal TemplateCreate so the public contract cannot
accept what the service would reject. There is no waba_id: the org's
connected WhatsApp account is resolved server-side.
^[a-z0-9_]{1,512}$^[a-zA-Z]{2,3}(_[A-Za-z]{2})?$WhatsApp message-template category. Mirrors Meta's template categories
and the Postgres template_category_enum. Meta may auto-recategorize a
template after review; the webhook handler reconciles ours to match.
MARKETING, UTILITY, AUTHENTICATION Show child attributes
Show child attributes
Response
Successful Response
WhatsApp message-template category. Mirrors Meta's template categories
and the Postgres template_category_enum. Meta may auto-recategorize a
template after review; the webhook handler reconciles ours to match.
MARKETING, UTILITY, AUTHENTICATION Lifecycle status of a WhatsApp message template. DRAFT is local-only
(authored but never submitted to Meta); every other value mirrors a Meta
review state. A template starts DRAFT, moves to PENDING on submit, then
Meta drives it to APPROVED / REJECTED and later PAUSED / DISABLED
via the template-status webhook.
DRAFT, PENDING, APPROVED, REJECTED, PAUSED, DISABLED, IN_APPEAL, PENDING_DELETION Show child attributes
Show child attributes