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

FieldValue
URLhttps://apis.rmlconnect.net/wba/template/update
Authorizationjwt
API Keyjwt
Header parameter nameAuthorization
Request Body schemaapplication/json

Template update examples

Template Update

Update the body component of an existing template.

Limited Time Offer Template

Update a marketing template with a limited-time offer and buttons.

Multi Product Message Template

Update a marketing template with a multi-product message button.

Auth Autofill

Update an authentication template with OTP autofill details.

Catalog Template

Update a marketing template that links to a catalog.

Copy Code Template

Update a marketing template with static URL and copy code buttons.

Carousel Template

Update a marketing template with carousel cards and buttons.

Request body schema

FieldRequiredTypeDescription
template_nameYesstringThe name of the template you want to edit.
languageNoArray of stringsLanguage code of language in which message text is written, such as "en" for English.
template_typeNostringThe type of media template that WhatsApp allows.
template_categoryNostringThe category of the template. Must be one of: MARKETING, UTILITY, AUTHENTICATION.
componentsYesobjectObject 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

FieldRequiredTypeDescription
template_nameYesstringThe name of the template you want to edit.
componentsYesobjectAn 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

FieldTypeDescription
successbooleanIndicates 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

FieldTypeDescription
messagestringThe response message.
reasonstringThe reason for not processing the request.
statusstringThe template edit status.
404 Not Found

Response

{
  "message": "Unknown template"
}

Response Schema: application/json

FieldTypeDescription
messagestringThe response message.
500 Internal Server Error

Response

{
  "status": "failure",
  "message": "unable to process request",
  "reason": "internal server error"
}

Response Schema: application/json

FieldTypeDescription
messagestringThe response message.
reasonstringThe reason for not processing the request.
statusstringThe status of the request.


Did this page help you?