curl -X POST "https://api.sayvy.ai/api/v1/templates/sync" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}'
import requests
url = "https://api.sayvy.ai/api/v1/templates/sync"
payload = {
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}
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/sync", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
channel_id: "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
})
});
const data = await response.json();
console.log(data);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/templates/sync"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}
"""))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
{
"success": true,
"message": "Successfully synced 18 templates from Meta",
"synced_count": 18
}
{
"detail": "WhatsApp channel/phone number not found for this organization."
}
{
"detail": "Unauthorized"
}
Templates
Sync templates
Synchronize approved message templates from your Meta WhatsApp Business Account to Sayvy AI
POST
/
api
/
v1
/
templates
/
sync
curl -X POST "https://api.sayvy.ai/api/v1/templates/sync" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}'
import requests
url = "https://api.sayvy.ai/api/v1/templates/sync"
payload = {
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}
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/sync", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
channel_id: "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
})
});
const data = await response.json();
console.log(data);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/templates/sync"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}
"""))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
{
"success": true,
"message": "Successfully synced 18 templates from Meta",
"synced_count": 18
}
{
"detail": "WhatsApp channel/phone number not found for this organization."
}
{
"detail": "Unauthorized"
}
Pulls all existing templates registered on your connected WhatsApp Business Account (WABA) from Meta Graph API v19.0 and upserts them into Sayvy AI’s local database. This updates template review statuses (
PENDING, APPROVED, REJECTED), components, and quality ratings.
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 to synchronize. Example:
8f3b0e2a-71d3-4a5f-9e6b-123456789abc.Response Fields
boolean
Whether synchronization completed successfully.
string
Informational description of the sync result.
number
Count of templates parsed and upserted into Sayvy AI.
curl -X POST "https://api.sayvy.ai/api/v1/templates/sync" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}'
import requests
url = "https://api.sayvy.ai/api/v1/templates/sync"
payload = {
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}
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/sync", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
},
body: JSON.stringify({
channel_id: "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
})
});
const data = await response.json();
console.log(data);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sayvy.ai/api/v1/templates/sync"))
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("""
{
"channel_id": "8f3b0e2a-71d3-4a5f-9e6b-123456789abc"
}
"""))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
{
"success": true,
"message": "Successfully synced 18 templates from Meta",
"synced_count": 18
}
{
"detail": "WhatsApp channel/phone number not found for this organization."
}
{
"detail": "Unauthorized"
}
‹ PreviousNext ›
Get template library
GET /api/v1/templates/library
Was this page helpful?