Video

Request Parameters

KeyDescriptionValueData TypeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
elementNameThe name of a template. The element name is unique for a WABAs namespace.{{ELEMENT_NAME}}StringRequiredelementName (not more than 180 char.) Mandatory fields
languageCodeLanguage code for the template. Refer to all the language codes here.{{LANGUAGE_CODE}}StringOptionallanguageCode default value : en_US
contentThe body of the template. Character limit: 1028. For "Authentication" category the first line should be - {{1}} is your verification code.{{CONTENT}}StringRequiredcontent (not more than 1024 char.)
categoryThe category of your template. {{CATEGORY}}StringRequired
verticalTEXT{{VERTICAL}}StringRequiredvertical (not more than 180 char.)
footerFooter of the template.{{FOOTER}}StringOptional
templateTypeVIDEO {{TEMPLATE_TYPE}}StringRequired
exampleTemplate Example{{EXAMPLE}}StringRequired
exampleMediaHandle Id required to generate media templates{{ENABLE_MEDIA}}StringRequiredThis is handleId.

Generate handleId here
enableSampleRequired for creating all types of templates{{ENABLE_SAMPLE}}true/falseOptionalif enableSample is true then exampleMedia
allowTemplateCategoryChangeBoolean value. If True, Meta will automatically update the category of the template as per the template content. Default value is False.{{ALLOW_TEMPLATE_CATEGORY_CHANGE}}BooleanOptional
APP_IDApp ID to fetch the access token{{APP_ID}}StringRequiredThe Id should be a valid app Id of Gupshup

The App must be associated with the account that owns the PARTNER_APP_TOKEN being used

Sample Request

curl --request POST \
     --url https://partner.gupshup.io/partner/app/947d28b8-459b-4dfe-9d4c-0ac8c6c245c9/templates \
     --header 'accept: application/json' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --header 'token: sk_711916ad1d5d4f21a9520fdef20516a1' \
     --data elementName=video_element1 \
     --data languageCode=en \
     --data 'footer=This is the footer' \
     --data 'content=Hi {{1}}.' \
     --data category=MARKETING \
     --data templateType=VIDEO \
     --data 'vertical=Ticket updated' \
     --data 'example=Hi User.' \
     --data enableSample=true \
     --data exampleMedia=4::aW1hZ2UvcadG5n:ARYaMMMA2QvIXuQZdPjWVXTOqfoBU3n0L1Ftyg4w57yxi9nD105yQDvW2nu3-HNo9HGefxZ-Ig-HAi3YSsckwIsOEUwxSPatsxT0Niob30E63A:e:1634884682:2281283925530161:100033655335566:ARaBAxW-1L-ZRu6SMSg \
     --data allowTemplateCategoryChange=true

Sample Response

{
    "status": "success",
    "template": {
        "appId": "a41b30f4-d202-4fdb-911e-3a8fbfbfb797",
        "category": "MARKETING",
        "containerMeta": "{\"appId\":\"a41b30f4-d202-4fdb-911e-3a8fbfbfb797\",\"data\":\"Hi {{1}}.\",\"footer\":\"This is the footer\",\"sampleText\":\"Hi User.\",\"sampleMedia\":\"4::aW1hZ2UvcadG5n:ARYaMMMA2QvIXuQZdPjWVXTOqfoBU3n0L1Ftyg4w57yxi9nD105yQDvW2nu3-HNo9HGefxZ-Ig-HAi3YSsckwIsOEUwxSPatsxT0Niob30E63A:e:1634884682:2281283925530161:100033655335566:ARaBAxW-1L-ZRu6SMSg\",\"enableSample\":true,\"editTemplate\":false,\"allowTemplateCategoryChange\":true,\"addSecurityRecommendation\":false}",
        "createdOn": 1716282572440,
        "data": "Hi {{1}}.\nThis is the footer",
        "elementName": "video_element1",
        "id": "80206293-ef61-4922-88c0-ff68768f02d8",
        "languageCode": "en",
        "languagePolicy": "deterministic",
        "meta": "{\"example\":\"Hi User.\"}",
        "modifiedOn": 1716282572440,
        "namespace": "9c7fe92f_2a48_40ec_83d0_69c62a772433",
        "priority": 1,
        "quality": "UNKNOWN",
        "retry": 0,
        "stage": "NONE",
        "status": "PENDING",
        "templateType": "VIDEO",
        "vertical": "Ticket updated",
        "wabaId": "104505526065633"
    }
}

Status Codes

Status CodeResponseComments
Success
200{
"status": "success",
"template": {
"appId": "a41b30f4-d202-4fdb-911e-3a8fbfbfb797",
"category": "MARKETING",
"containerMeta": "{"appId":"a41b30f4-d202-4fdb-911e-3a8fbfbfb797","data":"Hi {{1}}.","footer":"This is the footer","sampleText":"Hi User.","sampleMedia":"4::aW1hZ2UvcadG5n:ARYaMMMA2QvIXuQZdPjWVXTOqfoBU3n0L1Ftyg4w57yxi9nD105yQDvW2nu3-HNo9HGefxZ-Ig-HAi3YSsckwIsOEUwxSPatsxT0Niob30E63A:e:1634884682:2281283925530161:100033655335566:ARaBAxW-1L-ZRu6SMSg","enableSample":true,"editTemplate":false,"allowTemplateCategoryChange":true,"addSecurityRecommendation":false}",
"createdOn": 1716282572440,
"data": "Hi {{1}}.\nThis is the footer",
"elementName": "video_element1",
"id": "80206293-ef61-4922-88c0-ff68768f02d8",
"languageCode": "en",
"languagePolicy": "deterministic",
"meta": "{"example":"Hi User."}",
"modifiedOn": 1716282572440,
"namespace": "9c7fe92f_2a48_40ec_83d0_69c62a772433",
"priority": 1,
"quality": "UNKNOWN",
"retry": 0,
"stage": "NONE",
"status": "PENDING",
"templateType": "VIDEO",
"vertical": "Ticket updated",
"wabaId": "104505526065633"
}
}
Error
429{
"status": "error",
"message": "Too Many Requests"
}
10 Requests per Minute
500{
"status": "error",
"message": "Internal server error. Please try again later and If Issue still persist than contact Gupshup Dev Support"
}
For any Internal Error
Language
Click Try It! to start a request and see the response here!