Get a message template
curl --request GET \
--url https://api.social-api.ai/v1/platforms/whatsapp/templates/{id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/platforms/whatsapp/templates/{id}', 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/templates/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"category": "UTILITY",
"components": "<unknown>",
"id": "1234567890123456",
"language": "en_US",
"name": "order_confirmation",
"status": "APPROVED"
}{
"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
Get a message template
Returns a single message template by its WhatsApp template ID. Requires an active WhatsApp account on your workspace. The template is identified by its WhatsApp template ID.
GET
/
platforms
/
whatsapp
/
templates
/
{id}
Get a message template
curl --request GET \
--url https://api.social-api.ai/v1/platforms/whatsapp/templates/{id} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/platforms/whatsapp/templates/{id}', 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/templates/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"category": "UTILITY",
"components": "<unknown>",
"id": "1234567890123456",
"language": "en_US",
"name": "order_confirmation",
"status": "APPROVED"
}{
"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
WhatsApp template platform ID
Response
Template details
Available options:
AUTHENTICATION, MARKETING, UTILITY Example:
"UTILITY"
Components is the raw WhatsApp template component definition.
Example:
"1234567890123456"
Example:
"en_US"
Example:
"order_confirmation"
Available options:
APPROVED, PENDING, REJECTED, PAUSED, DISABLED Example:
"APPROVED"