List message templates
curl --request GET \
--url https://api.social-api.ai/v1/platforms/whatsapp/accounts/{id}/templates \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/platforms/whatsapp/accounts/{id}/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/whatsapp/accounts/{id}/templates"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"category": "UTILITY",
"components": "<unknown>",
"id": "1234567890123456",
"language": "en_US",
"name": "order_confirmation",
"status": "APPROVED"
}
],
"paging": {
"cursors": {
"after": "QVFIUjN...",
"before": "QVFIUjJ..."
},
"next": "https://graph.facebook.com/..."
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}WhatsApp
List message templates
Returns all message templates configured on the WhatsApp Business Account (WABA) associated with this connected account. Templates include approved, pending, rejected, and paused entries. Use the after cursor from paging.cursors to fetch subsequent pages.
GET
/
platforms
/
whatsapp
/
accounts
/
{id}
/
templates
List message templates
curl --request GET \
--url https://api.social-api.ai/v1/platforms/whatsapp/accounts/{id}/templates \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/platforms/whatsapp/accounts/{id}/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.social-api.ai/v1/platforms/whatsapp/accounts/{id}/templates"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"category": "UTILITY",
"components": "<unknown>",
"id": "1234567890123456",
"language": "en_US",
"name": "order_confirmation",
"status": "APPROVED"
}
],
"paging": {
"cursors": {
"after": "QVFIUjN...",
"before": "QVFIUjJ..."
},
"next": "https://graph.facebook.com/..."
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
Connected account ID (sapi_acc_...)
Query Parameters
Maximum number of templates to return (1-100)
Pagination cursor (after) from a previous response