curl -X POST "https://api.sayvy.ai/api/v1/templates" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off your next purchase with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Shop Now",
"url": "https://example.com/shop"
},
{
"type": "QUICK_REPLY",
"text": "Speak with Agent"
}
]
}
]
}'
import requests
url = "https://api.sayvy.ai/api/v1/templates"
payload = {
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Shop Now",
"url": "https://example.com/shop"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())
const response = await fetch("https://api.sayvy.ai/api/v1/templates", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
channel_id: "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
name: "summer_promo_2026",
language: "en_US",
category: "MARKETING",
components: [
{
"type": "BODY",
"text": "Hi {{1}}, your order {{2}} is being processed."
}
]
})
});
const data = await response.json();
console.log(data);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/templates"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}, your booking is confirmed."
}
]
}
"""))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
{
"id": "3a4b5c6d-7e8f-9012-3456-789abcdef012",
"account_id": "act_88492019",
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"waba_id": "104928374829102",
"meta_template_id": null,
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"status": "PENDING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off your next purchase with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
}
],
"quality_score": "",
"created_at": "2026-09-07T11:20:00Z",
"updated_at": "2026-09-07T11:20:00Z"
}
{
"detail": "WhatsApp channel/phone number not found for this organization."
}
{
"detail": "Unauthorized"
}
Templates
Create template
Register a new structured WhatsApp message template locally and submit it to Meta for approval
POST
/
api
/
v1
/
templates
curl -X POST "https://api.sayvy.ai/api/v1/templates" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off your next purchase with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Shop Now",
"url": "https://example.com/shop"
},
{
"type": "QUICK_REPLY",
"text": "Speak with Agent"
}
]
}
]
}'
import requests
url = "https://api.sayvy.ai/api/v1/templates"
payload = {
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Shop Now",
"url": "https://example.com/shop"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())
const response = await fetch("https://api.sayvy.ai/api/v1/templates", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
channel_id: "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
name: "summer_promo_2026",
language: "en_US",
category: "MARKETING",
components: [
{
"type": "BODY",
"text": "Hi {{1}}, your order {{2}} is being processed."
}
]
})
});
const data = await response.json();
console.log(data);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/templates"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}, your booking is confirmed."
}
]
}
"""))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
{
"id": "3a4b5c6d-7e8f-9012-3456-789abcdef012",
"account_id": "act_88492019",
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"waba_id": "104928374829102",
"meta_template_id": null,
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"status": "PENDING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off your next purchase with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
}
],
"quality_score": "",
"created_at": "2026-09-07T11:20:00Z",
"updated_at": "2026-09-07T11:20:00Z"
}
{
"detail": "WhatsApp channel/phone number not found for this organization."
}
{
"detail": "Unauthorized"
}
Create a new custom WhatsApp message template. The template record is saved locally with initial status
PENDING and asynchronously dispatched to Meta Graph API v19.0 under your connected WhatsApp Business Account (WABA).
Authentication
This endpoint requires Bearer token authentication.Authorization: Bearer <token>
| Header | Type | Required | Description | Format |
|---|---|---|---|---|
Authorization | string | Yes | Scoped organization API key or Bearer JWT token | Bearer <token> |
Input parameters
The following parameters are accepted in the JSON request body.string
required
Bearer token for authentication. Format:
Bearer <token>.string
required
UUID of the registered WhatsApp Business phone number channel in Sayvy AI.
string
required
Template identifier name on Meta (lowercase alphanumeric with underscores, maximum 255 characters). Example:
summer_promo_2026.string
required
Language code (e.g.
en_US, es_ES, pt_BR).string
required
Template category:
MARKETING: Promotional messages, lead offers, discounts.UTILITY: Order confirmations, delivery updates, receipts.AUTHENTICATION: OTP and two-factor authorization codes.
object[]
required
Structured array of template components (
HEADER, BODY, FOOTER, BUTTONS):Show Component Structure
Show Component Structure
string
required
Component type:
HEADER, BODY, FOOTER, or BUTTONS.string
Header format:
TEXT, IMAGE, VIDEO, or DOCUMENT.string
Component text. Use double curly braces for positional variables (e.g.
Hello {{1}}, your order {{2}} is confirmed.).object[]
Array of interactive button definitions (type
QUICK_REPLY, URL, or PHONE_NUMBER).Response Fields
string
Generated UUID identifier of the template in Sayvy AI.
string
UUID of the associated WhatsApp channel.
string
WhatsApp Business Account (WABA) identifier on Meta.
string
Meta’s remote template ID (assigned upon Meta confirmation).
string
Template unique name.
string
BCP-47 language tag (e.g.
en_US).string
Template category (
MARKETING, UTILITY, AUTHENTICATION).string
Current review status:
PENDING, APPROVED, or REJECTED.object[]
Array of configured components.
string
Meta quality score rating (
GREEN, YELLOW, RED, or empty).string
ISO 8601 creation timestamp.
string
ISO 8601 modification timestamp.
curl -X POST "https://api.sayvy.ai/api/v1/templates" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off your next purchase with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Shop Now",
"url": "https://example.com/shop"
},
{
"type": "QUICK_REPLY",
"text": "Speak with Agent"
}
]
}
]
}'
import requests
url = "https://api.sayvy.ai/api/v1/templates"
payload = {
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Shop Now",
"url": "https://example.com/shop"
}
]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())
const response = await fetch("https://api.sayvy.ai/api/v1/templates", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
channel_id: "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
name: "summer_promo_2026",
language: "en_US",
category: "MARKETING",
components: [
{
"type": "BODY",
"text": "Hi {{1}}, your order {{2}} is being processed."
}
]
})
});
const data = await response.json();
console.log(data);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/templates"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}, your booking is confirmed."
}
]
}
"""))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
{
"id": "3a4b5c6d-7e8f-9012-3456-789abcdef012",
"account_id": "act_88492019",
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc",
"waba_id": "104928374829102",
"meta_template_id": null,
"name": "summer_promo_2026",
"language": "en_US",
"category": "MARKETING",
"status": "PENDING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Exclusive Summer VIP Offer"
},
{
"type": "BODY",
"text": "Hi {{1}}, thank you for being a valued customer! Enjoy 20% off your next purchase with code {{2}}."
},
{
"type": "FOOTER",
"text": "Reply STOP to unsubscribe"
}
],
"quality_score": "",
"created_at": "2026-09-07T11:20:00Z",
"updated_at": "2026-09-07T11:20:00Z"
}
{
"detail": "WhatsApp channel/phone number not found for this organization."
}
{
"detail": "Unauthorized"
}
‹ PreviousNext ›
List templates
GET /api/v1/templates
Was this page helpful?