Edit Template

Use this API to edit a template using templateId.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
📘

**Note:**Updating carousel templates with Media is not permitted

You will need the below details to start using this API.

  1. App Id
  2. Template Id

Parameters

KeyDescriptionRequired/OptionalTypeValue
AuthorizationAccess Token for the applicationRequiredString{{PARTNER_APP_TOKEN}}
appIdUnique identifier of the Gupshup appRequiredString{{APP_ID}}
templateIdUnique identifier for a template, refer Get templates apiRequiredStringfc05da-f2135-45e2-8sad4-dc44xxxx
contentTEXT: The body of the template. Character limit: 1028OptionalStringyour ticket has been confirmed for {{1}} persons on date {{2}}.
templateTypeThe type of template: TEXT, IMAGE, VIDEO & DOCUMENTOptionalStringTEXT
exampleTEXT - An example of the template.OptionalStringyour ticket has been confirmed for 4 persons on date 2020-05-04
enableSampleBOOLEAN: True or False. Required for creating all types of templates.OptionalBooleantrue
headerHeader of the template. Applicable for templateType = Text Character limit: 60OptionalStringThis is the header
footerFooter of the template. Character limit: 60OptionalStringThis is the footer
buttonsUsed only if your template has a CTA. An example is also submitted if a URL button has variable parameter.OptionalString{"type":"PHONE_NUMBER","text":"Call Us","phone_number":"+xxxxxxxxxxx"},{"type":"URL","text":"Book A Demo","url":"[https://bookins.gupshup.io/{{1}}","example":["https://bookins.gupshup.io/abc"]}]
exampleMediaGet handleId from hereOptionalString4::aW1hZ2UvcadG5n:ARYaMMMA2QvIXuQZdPjWVXTOqfoBU3n0L1Ftyg4w57yxi9nD105yQDvW2nu3-HNo9HGefxZ-Ig-HAi3YSsckwIsOEUwxSPatsxT0Niob30E63A:e:1634884682:2281283925530161:100033655335566:ARaBAxW-1L-ZRu6SMSg
mediaIdMedia IDOptionalStringTEXT
mediaUrlMedia URLOptionalStringTEXT
categoryUse category from these option AUTHENTICATION, MARKETING, UTILITY in description.OptionalStringAUTHENTICATION

Sample Request

curl --location --request PUT 'https://partner.gupshup.io/partner/app/{{APP_ID}}/templates/{{TEMPLATE_ID}}' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'content={{CONTENT}}' \
--data-urlencode 'category={{TEMPLATE_CATEGORY}}' \
--data-urlencode 'templateType={{TEMPLATE_TYPE}}' \
--data-urlencode 'example={{EXAMPLE}}' \
--data-urlencode 'exampleMedia={{EXAMPLE_MEDIA}}' \
--data-urlencode 'header={{TEMPLATE_HEADER}}' \
--data-urlencode 'footer={{TEMPLATE_FOOTER}}' \
--data-urlencode 'buttons={{TEMPLATE_BUTTON}}' \
--data-urlencode 'mediaId={{MEDIA_ID}}' \
--data-urlencode 'exampleHeader={{EXAMPLE_HEADER}}'

Sample Response

  {
    "status": "success"
  }           

Status Codes

Status CodeResponseComments
Success
200{ "id": "460001903531489", "preview": { "expires_at": "2024-09-08T13:45:06+0000", "preview_url": "https://business.facebook.com/wa/manage/flows/460001903531489/preview/?token=a926bc93-ce7f-465e-9c61-60800e9befab" }, "status": "success" }
Error
400{ "status":"error", "message":"No Template found for given id" }
Template does not exist for the provided templateId.

Path Params
string
required
string
required
Form Data
string
string
string
boolean
boolean
string
string
integer
boolean
string
string
string
string
string
string
Headers
string
Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!