API Explorer
Templates Endpoint
This endpoint allows you to fetch the WhatsApp templates that have been synced. Each template contains a dictionary of the languages it has been translated to along with the content of the template for that language and the status of that translation.
Listing Templates
A GET
request returns the templates for your organization.
Each template has the following attributes:
- name - the name of the template
- translations - a dictionary of the translations of the template with the key being an ISO639-3 code
Each translation contains the following attributes:
- language - the ISO639-3 code for the language of this translation
- content - the content of the translation
- variable_count - the count of variables in this template
- status - the status of this translation, either
approved
,pending
,rejected
orunsupported_language
Example:
GET /api/v2/templates.json
Response is the list of templates for your organization:
{
"next": "http://example.com/api/v2/templates.json?cursor=cD0yMDE1LTExLTExKzExJTNBM40NjQlMkIwMCUzRv",
"previous": null,
"results": [
{
"name": "welcome_message",
"uuid": "f5901b62-ba76-4003-9c62-72fdacc1b7b7",
"translations": [
{
"language": "eng",
"content": "Hi {{1}}, your appointment is coming up on {{2}}",
"variable_count": 2,
"status": "active",
},
{
"language": "fra",
"content": "Bonjour {{1}}, votre rendez-vous est à venir {{2}}",
"variable_count": 2,
"status": "pending",
}
],
"created_on": "2013-08-19T19:11:21.082Z",
"modified_on": "2013-08-19T19:11:21.082Z"
},
...
}