curl --request PATCH \
--url https://api.messaging.phonovation.com/whatsapp/2/senders/{sender}/templates/{templateName} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "MARKETING",
"structure": {
"body": {
"text": "body {{1}} content",
"examples": [
"example"
]
},
"type": "TEXT"
}
}
'{
"id": "111",
"businessAccountId": 222,
"name": "media_template",
"language": "en",
"status": "APPROVED",
"category": "MARKETING",
"structure": {
"header": {
"format": "IMAGE"
},
"body": {
"text": "example {{1}} body"
},
"footer": {
"text": "exampleFooter"
},
"type": "MEDIA"
},
"quality": "HIGH",
"platform": {
"entityId": "entityId",
"applicationId": "applicationId"
},
"createdAt": "2024-01-01T00:00:00.000+0000",
"lastUpdatedAt": "2024-01-01T00:00:00.000+0000"
}Edit WhatsApp Template
Edit a WhatsApp template. Once edited, Phonovation submits a template for WhatsApp’s review and approval. When approved, a template can be sent to end users. Refer to template guidelines for additional info.
- Only templates with an approved, rejected, or paused status can be edited.
- Use the structure provided in the Create WhatsApp Template endpoint.
- Category of an approved template cannot be edited.
- Approved templates can be edited up to 10 times in a 30-day window, or 1 time in a 24-hour window. Rejected or paused templates can be edited an unlimited number of times.
Required scope: Enable one of: whatsapp:manage.
curl --request PATCH \
--url https://api.messaging.phonovation.com/whatsapp/2/senders/{sender}/templates/{templateName} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"category": "MARKETING",
"structure": {
"body": {
"text": "body {{1}} content",
"examples": [
"example"
]
},
"type": "TEXT"
}
}
'{
"id": "111",
"businessAccountId": 222,
"name": "media_template",
"language": "en",
"status": "APPROVED",
"category": "MARKETING",
"structure": {
"header": {
"format": "IMAGE"
},
"body": {
"text": "example {{1}} body"
},
"footer": {
"text": "exampleFooter"
},
"type": "MEDIA"
},
"quality": "HIGH",
"platform": {
"entityId": "entityId",
"applicationId": "applicationId"
},
"createdAt": "2024-01-01T00:00:00.000+0000",
"lastUpdatedAt": "2024-01-01T00:00:00.000+0000"
}Authorizations
This is the most secure authorization type and the one with the most flexibility.
API keys can be generated by calling the dedicated API method. Furthermore, API keys can have a limited scope and cover only some API methods. Lastly, they can be revoked at any time. This range of possibilities makes API keys well suited for separating the API access rights across multiple applications or use cases. Finally, the loss of an API key is easily manageable.
You can manage your API keys from GUI, or programmatically with dedicated API.
API key Authorization header example:
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Path Parameters
Registered WhatsApp sender number. Must be in international format.
Template ID. Must be a number.
Body
Category of the template. Approved template category cannot be edited.
MARKETING, AUTHENTICATION, UTILITY "MARKETING"
Template structure. Format depends on the template category.
Template validity period in which WhatsApp will try to deliver a template message. Supported ranges are dependent on template category: 10 seconds to 15 minutes for Authentication, 30 seconds to 12 hours for Utility, and 12 to 48 hours for Marketing. Omitting this field leaves the current validity period unchanged. Marketing validity periods apply only to messages sent through the Marketing Messages API and are ignored by the Cloud API.
Show child attributes
Show child attributes
Platform options. For more details, see documentation.
Show child attributes
Show child attributes
Sub category of template. It is required only if edited template has already sub category.
ORDER_STATUS Response
Template edited.
- DefaultMarketingTemplateApiResponse
- DefaultTemplateApiResponse
- AuthenticationTemplateApiResponse
The list of the results for this page.
Structure of the created template. Can consist of body (mandatory), header, footer, buttons, carousel, limited time offer, call permission request and shortening options.
Show child attributes
Show child attributes
Template ID.
"111"
Business account ID to which template belongs.
222
Name of the template.
"template_name"
Template language, one template with same name can have multiple transliterations.
af, sq, ar, ar_EG, ar_AE, ar_LB, ar_MA, ar_QA, az, bn, bn_IN, bg, ca, zh_CN, zh_HK, zh_TW, hr, cs, da, nl, nl_BE, en, en_GB, en_US, en_AE, en_AU, en_CA, en_GH, en_IE, en_IN, en_JM, en_MY, en_NZ, en_QA, en_SG, en_UG, en_ZA, et, fil, fi, fr, fr_BE, fr_CA, fr_CH, fr_CI, fr_MA, ka, de, de_AT, de_CH, el, gu, ha, he, hi, hu, id, ga, it, ja, kn, kk, rw_RW, ko, ky_KG, lo, lv, lt, mk, ms, ml, mr, nb, fa, pl, pt_BR, pt_PT, pa, ro, ru, sr, si_LK, sk, sl, es, es_AR, es_CL, es_CO, es_CR, es_DO, es_EC, es_HN, es_MX, es_PA, es_PE, es_ES, es_UY, sw, sv, ta, te, th, tr, uk, ur, uz, vi, zu, unknown "en"
Status of the template.
APPROVED, IN_APPEAL, PENDING, REJECTED, PENDING_DELETION, DELETED, REINSTATED, FLAGGED, FIRST_PAUSED, SECOND_PAUSED, DISABLED, ARCHIVED, UNKNOWN "APPROVED"
Category of the template.
MARKETING, AUTHENTICATION, UTILITY "MARKETING"
Quality of the template.
HIGH, MEDIUM, LOW, UNKNOWN "HIGH"
Template validity period in which WhatsApp will try to deliver a template message. Supported ranges are dependent on template category: 10 seconds to 15 minutes for Authentication, 30 seconds to 12 hours for Utility, and 12 to 48 hours for Marketing. Marketing validity periods apply only to messages sent through the Marketing Messages API and are ignored by the Cloud API.
Show child attributes
Show child attributes
Platform options. For more details, see documentation.
Show child attributes
Show child attributes
Creation date of the template.
Last update date of the template.
Name of the library template from which this template was created. If not present, the template was not created using the template library.