Edit a WhatsApp Template

Easily update your existing WhatsApp templates with the DoubleTick API to keep your messages relevant and compliant with business needs. ✏️✅

API Endpoint

Use the following endpoint to edit a WhatsApp message template:

PATCH https://public.doubletick.io/template/:templateId

Request Headers

{
  "Authorization": "YOUR_API_KEY",
  "Content-Type": "application/json"
}

Request Body Parameters

Standard Template Request Body

{
  "language": "en",
  "components": {
    "header": {
      "format": "TEXT",
      "text": "Updated Header Text"
    },
    "body": { "text": "Updated Body Text" },
    "footer": { "text": "Updated Footer Text" },
    "buttons": [
      {
        "type": "QUICK_REPLY",
        "text": "Updated Button Text",
        "url": "https://example.com/sample-url",
        "phoneNumber": "example_phone_number"
      }
    ]
  },
  "category": "MARKETING",
  "allowCategoryUpdate": true,
  "name": "your_template_name",
  "wabaNumbers": ["sender_waba_number"]
}

Carousel Template Request Body

{
  "language": "en",
  "components": {
    "body": { "text": "Updated Body Text" },
    "carousel": {
      "cards": [
        {
          "components": [
            {
              "header": {
                "format": "IMAGE",
                "example": { "link": "https://example.com/product-1.jpg" }
              },
              "body": { "text": "Updated Product 1" },
              "buttons": [
                {
                  "type": "URL",
                  "text": "View Product",
                  "url": "https://example.com/product-1"
                }
              ]
            }
          ]
        },
        {
          "components": [
            {
              "header": {
                "format": "IMAGE",
                "example": { "link": "https://example.com/product-2.jpg" }
              },
              "body": { "text": "Updated Product 2" },
              "buttons": [
                {
                  "type": "URL",
                  "text": "View Product",
                  "url": "https://example.com/product-2"
                }
              ]
            }
          ]
        }
      ]
    }
  },
  "category": "MARKETING",
  "allowCategoryUpdate": true,
  "name": "your_carousel_template_name",
  "wabaNumbers": ["sender_waba_number"]
}

Parameters

PATH PARAMS:

  • templateId (string, required): The unique ID of the template to be updated.

BODY PARAMS:

  • language (string, required): The language of the template. (eg., Defaults to be en English)
  • components (object, optional): Updated components of the template.
    • carousel (object, optional): Only for MARKETING category. Send it with body; header, footer and buttons are not allowed at the top level.
      • cards (array of objects, required): 1 to 10 cards.
        • components (array, required): Array with one object containing the card's header, body and buttons.
          • header (object, required)
            • format (string, required): IMAGE or VIDEO. Must be the same for every card.
            • example.link (string, required): Public URL of the card's image or video.
          • body (object, optional)
            • text (string, required): Length not exceed 160 characters.
          • buttons (array of objects, required): 1 to 2 buttons (QUICK_REPLY, URL, PHONE_NUMBER). Every card must have the same button types in the same order.
    • header (object, optional)
      • format (string, required): Available options are TEXT, IMAGE, VIDEO & DOCUMENT.
      • text (string, optional): Length not exceed 60 characters.
    • body (object, optional)
      • text (string, required): Length not exceed 1024 characters.
    • footer (object, optional)
      • text (string, required): Length not exceed 60 characters.
    • buttons (array, optional)
      • type (string, required): Button type (QUICK_REPLY, URL, PHONE_NUMBER).
      • text (string, required): Button text. Length to be in between 1 to 25 characters.
      • url (string, optional): URL for URL button type.
      • phoneNumber (string, optional): Phone number for PHONE_NUMBER button type.
  • category (string, required): Template category (MARKETING, UTILITY).
  • allowCategoryUpdate (boolean, required): Allows Meta to auto-assign a category (default: true).
  • name (string, required)
    • Unique name for the template.
    • Length to be in between 1 to 512 characters.
  • wabaNumbers (array of strings, required): List of WhatsApp Business API numbers associated with the template.

Response

Success Response (201)

{
  "success": true
}

Bad Request (400)

{
  "message": "error_message",
  "error": "Bad Request",
  "statusCode": 400
}

Unauthorized (401)

{
  "message": "Invalid public api key",
  "error": "Unauthorized",
  "statusCode": 401
}

Not Found (404)

{
  "message": "error_message",
  "statusCode": 404
}

Unprocessable Entity (422)

{
  "message": "invalid file type for audio: text/html; charset=utf-8",
  "error": "Unprocessable Entity",
  "statusCode": 422
}

Best Practices

  • Double-check the template ID before sending an edit request.
  • Use Get Templates API to list all available templates before updating.
  • Keep the same name and send the template's own number in wabaNumbers.
  • A template can be edited only once every 24 hours.

What’s Next

Explore more message types and enhance your WhatsApp communication with DoubleTick API

Did this page help you?