Edit template

Updates an existing WhatsApp message template by id, accepting the same form fields as the create endpoint.

Request parameters

Path parameters

KeyDescriptionValuesData TypeRequired/Optional
appIdIdentifier of the WhatsApp app the call acts on.6f414190-d45c-4671-bca1-fb6c3018cb13StringRequired
templateIdHSM template idtpl-1001StringRequired

Body

KeyDescriptionValuesData TypeRequired/Optional
elementNameTemplate name, used to reference it when sending. Lower case, no spaces.text_element1—Required
languageCodeLanguage the template is authored in, as a WhatsApp language code.en—Required
contentTemplate body / HSM contentyour otp is {{1}}—Required
categoryMARKETING, UTILITY, AUTHENTICATIONMARKETING—Required
verticalInternal label for grouping templates; not shown to end users.Internal_vertical—Optional
templateTypeTEXT, IMAGE, VIDEO, DOCUMENT, …TEXT—Optional
exampleSample values for variables in contentyour otp is {{1}}—Optional
headerHeader text when template has a headerHi All—Optional
exampleHeaderSample header for approvalHi All—Optional
footerFooter text shown in small type beneath the body.This is footer—Optional
allowTemplateCategoryChangeAllow Meta category change during approvaltrue—Optional
buttonsJSON array of button objects[{"type":"QUICK_REPLY","text":"please check"},{"type":"URL","text":"test","url":"https://www.google.co.uk/","buttonValue":"https://www.google.co.uk/","suffix":""}]—Optional
nameOptional display name (legacy field; some flows use data instead)Order update—Optional
sourceOrigin of the template, for reporting on where templates are authored.PARTNER_PORTAL—Optional
dataOptional; prefer contentLegacy alias for content on some integrations—Optional
enableSampleWhether content and example carry {{n}} placeholders. Set true when they do, so the example is used to seed the approval sample.false—Optional
sendAsPixTemplateCreates the template as a PIX payment template (Brazil). Pair it with an ORDER_DETAILS button; the template itself stays templateType=TEXT.true—Optional
parameterFormatHow placeholders in content are written: POSITIONAL for {{1}}, NAMED for {{name}}.POSITIONAL—Optional
checkerApprovalRequiredWhether the template needs maker-checker approval before it is submitted.false—Optional
isLTOCreates the template as a limited-time offer. Pair it with a COPY_CODE button; the template itself stays templateType=TEXT.true—Optional
hasExpirationWhether the limited-time offer shows a countdown to its expiry.true—Optional
limitedOfferTextBanner text for the limited-time offer. Returned inside containerMeta as limitedTimeOffer.text, which is derived output rather than a field to send.offer limited—Optional

Sample cURL — Edit template.

curl --request PUT \
  --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template/tpl-1001' \
  --header 'Authorization: Bearer <UT>' \
  --header 'Accept: application/json' \
  --data-urlencode 'elementName=text_element1' \
  --data-urlencode 'languageCode=en' \
  --data-urlencode 'content=your otp is {{1}}' \
  --data-urlencode 'category=MARKETING' \
  --data-urlencode 'vertical=Internal_vertical' \
  --data-urlencode 'templateType=TEXT' \
  --data-urlencode 'example=your otp is {{1}}' \
  --data-urlencode 'header=Hi All' \
  --data-urlencode 'exampleHeader=Hi All' \
  --data-urlencode 'footer=This is footer' \
  --data-urlencode 'allowTemplateCategoryChange=true' \
  --data-urlencode 'buttons=[{"type":"QUICK_REPLY","text":"please check"},{"type":"URL","text":"test","url":"https://www.google.co.uk/","buttonValue":"https://www.google.co.uk/","suffix":""}]' \
  --data-urlencode 'name=Order update' \
  --data-urlencode 'source=PARTNER_PORTAL' \
  --data-urlencode 'data=Legacy alias for content on some integrations' \
  --data-urlencode 'enableSample=false' \
  --data-urlencode 'sendAsPixTemplate=true' \
  --data-urlencode 'parameterFormat=POSITIONAL' \
  --data-urlencode 'checkerApprovalRequired=false' \
  --data-urlencode 'isLTO=true' \
  --data-urlencode 'hasExpiration=true' \
  --data-urlencode 'limitedOfferText=offer limited'

Sample success response (200)

{
  "status": "success",
  "template": {
    "appId": "72aeca04-1839-4b1a-bc0d-4ec2140d0e58",
    "category": "MARKETING",
    "containerMeta": "{\"appId\":\"72aeca04-1839-4b1a-bc0d-4ec2140d0e58\",\"data\":\"Hi All, Here are our products.\",\"buttons\":[{\"type\":\"COPY_CODE\",\"example\":\"250FF\"},{\"type\":\"URL\",\"text\":\"Shop Now\",\"url\":\"https://www.luckyshrub.com/shop?promo={{1}}\",\"example\":[\"summer2023\"]}],\"sampleText\":\"Hi All, Here are our products.\",\"enableSample\":true,\"editTemplate\":false,\"addSecurityRecommendation\":false,\"limitedTimeOffer\":{\"text\":\"offer limited\",\"has_expiration\":true},\"isCPR\":false,\"cpr\":false}",
    "createdOn": 1787728719434,
    "data": "Hi All, Here are our products.\noffer limited | true | [Copy offer code,{{1}}] | [Shop Now,https://www.luckyshrub.com/shop?promo={{1}}]",
    "elementName": "flash_sale_lto_v2",
    "id": "e2f5248e-5d2c-4248-b466-d8af0fa47347",
    "languageCode": "en",
    "languagePolicy": "deterministic",
    "meta": "{\"example\":\"Hi All, Here are our products.\"}",
    "modifiedOn": 1787728719434,
    "namespace": "28245a35_2995_4998_a7a7_d4e86fa48eab",
    "priority": 1,
    "quality": "UNKNOWN",
    "retry": 0,
    "stage": "NONE",
    "status": "PENDING",
    "templateType": "TEXT",
    "vertical": "Promotion",
    "wabaId": "1399511105666438"
  }
}
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Identifier of the WhatsApp app the call acts on.

string
required

HSM template id

Form Data

Create WhatsApp HSM template (application/x-www-form-urlencoded).

string
required

Template name, used to reference it when sending. Lower case, no spaces.

string
required

Language the template is authored in, as a WhatsApp language code.

string
required

Template body / HSM content

string
required

MARKETING, UTILITY, AUTHENTICATION

string

Internal label for grouping templates; not shown to end users.

string

TEXT, IMAGE, VIDEO, DOCUMENT, …

string

Sample values for variables in content

string

Header text when template has a header

string

Sample header for approval

string

Allow Meta category change during approval

string

JSON array of button objects

string

Optional display name (legacy field; some flows use data instead)

string

Origin of the template, for reporting on where templates are authored.

string

Optional; prefer content

string

Whether content and example carry {{n}} placeholders. Set true when they do, so the example is used to seed the approval sample.

string

Creates the template as a PIX payment template (Brazil). Pair it with an ORDER_DETAILS button; the template itself stays templateType=TEXT.

string

How placeholders in content are written: POSITIONAL for {{1}}, NAMED for {{name}}.

string

Whether the template needs maker-checker approval before it is submitted.

string

Creates the template as a limited-time offer. Pair it with a COPY_CODE button; the template itself stays templateType=TEXT.

string

Whether the limited-time offer shows a countdown to its expiry.

string

Banner text for the limited-time offer. Returned inside containerMeta as limitedTimeOffer.text, which is derived output rather than a field to send.

Responses

Language
Credentials
Bearer
Universal Token (UT)
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json