Templates
The message template object
Attributes
idstringrequiredIdentifier for this resource.
namestringrequiredHuman-readable name for this resource.
languagestringrequiredLanguage or locale code used for this content.
categorystringrequiredSpecifies category for this graph graph message template.
statusstringrequiredCurrent status of this resource or operation.
componentsarray of anyrequirednullable itemsStructured components that make up this message or template.
quality_scoreobjectStructured quality score values for this graph graph message template.
Show 1 child field
rejected_reasonstringnullableSpecifies rejected reason for this graph graph message template.
previous_categorystringnullableSpecifies previous category for this graph graph message template.
{
"id": "string",
"name": "string",
"language": "string",
"category": "string",
"status": "string",
"components": [
null
],
"quality_score": {
"score": "string"
},
"rejected_reason": "string",
"previous_category": "string"
}Create message template
- Base URL
https://api.polymorfa.com- Required permission
messages:write
Path parameters
versionstringrequiredSpecifies version for this path parameter.
wabaIdstringrequiredIdentifier for the waba.
Headers
Idempotency-Keystringmin length1Optional key of 1 to 255 UTF-8 bytes, retained for 24 hours. Reuse it for the same request after an uncertain outcome; a completed request is not sent again.
Body
namestringrequiredHuman-readable name for this resource.
languagestringrequiredLanguage or locale code used for this content.
categorystringrequiredSpecifies category for this graph graph create message template request.
Allowed valuesUTILITYMARKETINGAUTHENTICATIONallow_category_changebooleanWhether allow category change.
componentsarray of anyrequiredmax items1000nullable itemsStructured components that make up this message or template.
Responses
200Template submitted
idstringrequiredIdentifier for this resource.
statusstringrequiredCurrent status of this resource or operation.
categorystringrequiredSpecifies category for this graph graph create message template response.
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
409Idempotency key completed, in progress, has an unknown outcome, or was reused for a different request
429Rate limited
500Internal error
502Provider response unavailable or malformed; the write outcome may be unknown
503Provider unavailable or pre-dispatch reservation failed; use the stable error code to distinguish an unknown outcome from a proven no-attempt refusal
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl -X POST "https://api.polymorfa.com/graph/whatsapp/v26.0/<wabaId>/message_templates" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "order_update",
"language": "en_US",
"category": "UTILITY",
"components": [
null
]
}'{
"id": "string",
"status": "string",
"category": "string"
}List message templates
- Base URL
https://api.polymorfa.com- Required permission
messages:write
Path parameters
versionstringrequiredSpecifies version for this path parameter.
wabaIdstringrequiredIdentifier for the waba.
Responses
200Message templates
dataarray of objectrequiredStructured data carried by this object.
Show 9 child fields
pagingobjectrequiredStructured paging values for this graph graph message templates list response.
Show 1 child field
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
429Rate limited
500Internal error
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl "https://api.polymorfa.com/graph/whatsapp/v26.0/<wabaId>/message_templates" \
-H "Authorization: Bearer YOUR_API_KEY"{
"data": [
{
"id": "string",
"name": "string",
"language": "string",
"category": "string",
"status": "string",
"components": [
null
]
}
],
"paging": {
"cursors": {
"before": "string",
"after": "string"
}
}
}Delete message template
- Base URL
https://api.polymorfa.com- Required permission
messages:write
A successful response confirms provider deletion. A later complete catalog read reconciles any stored template copies that could not be removed during the delete request.
Path parameters
versionstringrequiredSpecifies version for this path parameter.
wabaIdstringrequiredIdentifier for the waba.
Query parameters
namestringHuman-readable name for this resource.
Headers
Idempotency-Keystringmin length1Optional key of 1 to 255 UTF-8 bytes, retained for 24 hours. Reuse it for the same request after an uncertain outcome; a completed request is not sent again.
Responses
200Deleted
successbooleanrequiredWhether the request succeeded.
Show 3 headers
400Bad request
401Unauthenticated
403Permission error
404Object does not exist
409Idempotency key completed, in progress, has an unknown outcome, or was reused for a different request
429Rate limited
500Internal error
502Provider response unavailable or malformed; the write outcome may be unknown
503Provider unavailable or pre-dispatch reservation failed; use the stable error code to distinguish an unknown outcome from a proven no-attempt refusal
Graph API v26.0. The version is part of the URL; Graph requests take no Polymorfa-Version header.
curl -X DELETE "https://api.polymorfa.com/graph/whatsapp/v26.0/<wabaId>/message_templates" \
-H "Authorization: Bearer YOUR_API_KEY"{
"success": true
}