Skip to content

Update template

Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.

PATCH /v1/whatsapp/templates/{templateName}

Update a message template's components. Only certain fields can be updated depending on the template's current approval state. Approved templates can only have components updated.

Parameters

  • templateName (path, string) required — Template name

Request body

Content-Type: application/json

  • accountId (string) required — WhatsApp social account ID
  • components (array) required — Updated template components

Example:

json

{
  "accountId": "507f1f77bcf86cd799439011",
  "components": [
    {
      "type": "body",
      "text": "Updated: Your order {{1}} is confirmed. Delivery by {{2}}",
      "example": {
        "body_text": [
          [
            "ORD-12345",
            "April 1"
          ]
        ]
      }
    },
    {
      "type": "buttons",
      "buttons": [
        {
          "type": "quick_reply",
          "text": "Track Order"
        }
      ]
    }
  ]
}

Responses

200 — Template updated successfully

  • success (boolean)
  • template (object)

400 — Validation error (missing fields)

401

404