Edit Template
Use the Edit Template API to update an existing WhatsApp Business template by changing its name, language, category, components, buttons, or bidding details.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/wba/template/update |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
| Request Body schema | application/json |
Template update examples
Update the body component of an existing template.
Update a marketing template with a limited-time offer and buttons.
Update a marketing template with a multi-product message button.
Update an authentication template with OTP autofill details.
Update a marketing template that links to a catalog.
Update a marketing template with static URL and copy code buttons.
Update a marketing template with carousel cards and buttons.
Request body schema
| Field | Required | Type | Description |
|---|---|---|---|
| template_name | Yes | string | The name of the template you want to edit. |
| language | No | Array of strings | Language code of language in which message text is written, such as "en" for English. |
| template_type | No | string | The type of media template that WhatsApp allows. |
| template_category | No | string | The category of the template. Must be one of: MARKETING, UTILITY, AUTHENTICATION. |
| components | Yes | object | Object containing the components of the template. |
Request examples
1. Template Update
Request sample
{
"template_name": "test_vid2",
"components": {
"body": {
"text": "WELCOME TO TECH"
}
}
}Request body schema
| Field | Required | Type | Description |
|---|---|---|---|
| template_name | Yes | string | The name of the template you want to edit. |
| components | Yes | object | An object containing the components of the template. |
2. Limited Time Offer Template
Request sample
{
"template_name": "{template_name}",
"language": [
"{lang code}"
],
"template_type": "template",
"template_category": "MARKETING",
"components": {
"limited_time_offer": {
"text": "limited offer",
"has_expiration": true
},
"body": {
"text": "TEXT FOR BODY"
},
"buttons": {
"type": "limited_time_offer",
"elements": [
{
"type": "copy_code",
"example": "CARIBE25"
},
{
"label": "action",
"type": "static",
"website": "xxxxx://xxxxxxxxxxxx/",
"website_example": "xxxxx://xxxxxxxxx/"
}
]
}
}
}3. Multi Product Message Template
Request sample
{
"template_name": "{template_name}",
"language": [
"{lang code}"
],
"template_type": "template",
"template_category": "MARKETING",
"components": {
"header": {
"type": "text",
"text": "header - text"
},
"body": {
"text": "test for body - 1"
},
"buttons": {
"type": "mpm",
"elements": [
{
"text": "View items"
}
]
}
}
}4. Auth Autofill
Request sample
{
"template_name": "{template_name}",
"language": [
"{lang code}"
],
"template_type": "template",
"template_category": "AUTHENTICATION",
"components": {
"body": {
"add_security_recommendation": "true/false"
},
"footer": {
"code_expiration_minutes": {
"upto 90 mins possible": "string"
}
},
"buttons": {
"type": "OTP",
"otp_type": "ONE_TAP",
"text": "Copy Code",
"autofill_text": "Autofill",
"package_name": "{package name of App}",
"signature_hash": "{signature_hash of App}"
}
}
}5. Catalog Template
Request sample
{
"template_name": "{template name}",
"language": [
"en"
],
"template_category": "MARKETING",
"template_type": "template",
"components": {
"body": {
"text": "Now shop for your favourite products right here on WhatsApp! Get Rs {{1}} off on all orders",
"example": [
"10"
]
},
"buttons": {
"type": "call_to_action",
"elements": [
{
"type": "view_catalog"
}
]
},
"footer": {
"text": "Thank You"
}
}
}6. Copy Code Template
Request sample
{
"template_name": "{template name}",
"language": [
"en"
],
"template_category": "MARKETING",
"template_type": "template",
"components": {
"body": {
"text": "Get flat {{1}} off on women's jeans, sarees online - Free Shipping, Cash On Delivery, Easy Returns & Exchange",
"example": [
"10"
]
},
"header": {
"type": "text",
"text": "Hello"
},
"buttons": {
"type": "call_to_action",
"elements": [
{
"type": "static",
"label": "view",
"website": "xxxxx://xxxxxxx"
},
{
"type": "copy_code",
"example": "5Tdg0"
}
]
},
"footer": {
"text": "Thank You"
}
}
}7. Carousel Template
Request sample
{
"template_name": "{template name}",
"language": [
"en"
],
"template_category": "MARKETING",
"template_type": "template",
"components": {
"body": {
"text": "Summer is here, and we have the freshest produce around! get {{1}} off your next order.",
"example": [
"100"
]
},
"cards": {
"header_type": "image",
"header_example": "https://picsum.photos/200/xxx?gxxxxx",
"button_types": [
"url",
"quick_reply"
],
"elements": [
{
"body": {
"text": "Rare lemons for unique cocktails. Use code {{1}} to get {{2}} off all produce.",
"example": [
"10O2P",
"10%"
]
},
"buttons": [
{
"type": "quick_reply",
"text": "view more"
},
{
"type": "dynamic",
"label": "open",
"website": "xxxxx://xxxxxxx/{{1}}",
"website_example": "xxxxx://xxxxxxxxx/client"
}
]
},
{
"body": {
"text": "Exotic fruit for unique cocktails! Use code {{1}} to get {{2}} off all exotic produce.",
"example": [
"10O2P",
"10%"
]
},
"buttons": [
{
"type": "quick_reply",
"text": "view"
},
{
"type": "dynamic",
"label": "visit",
"website": "xxxxx://xxxxxxxxx/{{1}}",
"website_example": "xxxxx://xxxxxxx/student"
}
]
}
]
}
}
}Responses
200 Success
Response
{
"success": true
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates the template edit process is successful or not. |
401 Unauthorized
Response
{
"message": "unable to process campaign request",
"reason": "jwt token expired",
"status": "failure"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the request. |
| status | string | The template edit status. |
404 Not Found
Response
{
"message": "Unknown template"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
500 Internal Server Error
Response
{
"status": "failure",
"message": "unable to process request",
"reason": "internal server error"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the request. |
| status | string | The status of the request. |
Updated 12 days ago