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

{
  "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"]
}

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.
    • 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.

What’s Next

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