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…

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"
  }           
Path Params
string
required

Unique identifier of the app.

string
required

Unique identifier for a template, refer Get templates api

Form Data
string

TEXT: The body of the template. Character limit: 1028

string

The type of template: TEXT, IMAGE, LOCATION, PRODUCT, CATALOG, VIDEO & DOCUMENT

string

TEXT - An example of the template.

boolean

BOOLEAN: True or False. Required for creating all types of templates.

string

Header of the template. Applicable for templateType = Text Character limit: 60

string

Used only if your template has a CTA. An example is also submitted if a URL button has variable parameter.

string

Get handleId from here

string

Media ID

string

Media URL

string

Use category from these option AUTHENTICATION, MARKETING, UTILITY in description.

Headers
string
required

Your app token, please refer Get access token api to get the token from partner documentation.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json