Create Voice Type Template

Use this API to create Voice templates.

Request Parameters

KeyDescriptionValueData typeRequired/OptionalConstraints
AuthorizationAccess Token for the application{{PARTNER_APP_TOKEN}}StringRequiredShould be a valid Partner App Access Token
appIdApp ID to fetch the access token{{APP_ID}}StringRequired- The 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
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.{{CONTENT}}StringRequiredcontent (not more than 1024 char.)
categoryThe category of your template.{{CATEGORY}}StringRequiredCategory Type: MARKETING UTILITY
verticalTEXT{{VERTICAL}}StringRequiredvertical (not more than 180 char.)
templateTypePRODUCT{{TEMPLATE_TYPE}}StringRequiredThe type of template: PRODUCT
exampleTemplate Example{{EXAMPLE}}StringRequired
enableSampleRequired for creating all types of templates{{ENABLE_SAMPLE}}true/falseOptionalif enableSample is true then exampleMedia
headerHeader of the template.{{HEADER}}StringOptional
footerFooter of the template. Character limit: 60.{{FOOTER}}StringOptional
exampleHeaderThis is the header{{EXAMPLE_HEADER}}StringOptional
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}}StringOptional
buttonsString

Sample Request

curl --location https://partner.gupshup.io/partner/app/b6016edd-12fb-4da1-8e96-e5bb634e271f/template' \
--header 'Authorization: <APP_TOKEN>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'languageCode=en' \
--data-urlencode 'content=COnnect with us' \
--data-urlencode 'footer=Footer' \
--data-urlencode 'category=MARKETING' \
--data-urlencode 'example=COnnect with us' \
--data-urlencode 'vertical=voice' \
--data-urlencode 'templateType=TEXT' \
--data-urlencode 'elementName=voicetemplate4' \
--data-urlencode 'header=Welcome to MMT' \
--data-urlencode 'exampleHeader=Welcome to MMT' \
--data-urlencode 'buttons=[{"type":"VOICE_CALL","text":"Voice Call"}]'

Sample Response

{
    "status": "success",
    "template": {
        "appId": "a41b30f4-d202-4fdb-911e-3a8fbfbfb797",
        "buttonSupported": "MPM",
        "category": "MARKETING",
        "containerMeta": "{\"appId\":\"a41b30f4-d202-4fdb-911e-3a8fbfbfb797\",\"data\":\"Dear Customer, Here are our products. \\\\nThanks for shopping with us\",\"buttons\":[{\"type\":\"MPM\",\"text\":\"View items\"}],\"header\":\"Hi All\",\"footer\":\"This is footer\",\"sampleText\":\"Dear Customer, Here are our products. \\\\nThanks for shopping with us\",\"sampleHeader\":\"Hi All\",\"enableSample\":true,\"editTemplate\":false,\"allowTemplateCategoryChange\":true,\"addSecurityRecommendation\":false}",
        "createdOn": 1710799689011,
        "data": "Hi All\nDear Customer, Here are our products. \\nThanks for shopping with us\nThis is footer | [View items]",
        "elementName": "automation_template_439231",
        "id": "1f7871fc-2933-41dd-8f67-ab2a75f055fa",
        "languageCode": "en",
        "languagePolicy": "deterministic",
        "meta": "{\"example\":\"Dear Customer, Here are our products. \\\\nThanks for shopping with us\"}",
        "modifiedOn": 1710799689011,
        "namespace": "9c7fe92f_2a48_40ec_83d0_69c62a772433",
        "priority": 1,
        "quality": "UNKNOWN",
        "retry": 0,
        "stage": "NONE",
        "status": "PENDING",
        "templateType": "TEXT",
        "vertical": "Internal_vertical",
        "wabaId": "104505526065633"
    }
}

Status Codes

Status CodeResponseComments
Success
200{ "status": "success", "template": { "appId": "a41b30f4-d202-4fdb-911e-3a8fbfbfb797", "buttonSupported": "MPM", "category": "MARKETING", "containerMeta": "{\"appId\":\"a41b30f4-d202-4fdb-911e-3a8fbfbfb797\",\"data\":\"Dear Customer, Here are our products. \\\\nThanks for shopping with us\",\"buttons\":[{\"type\":\"MPM\",\"text\":\"View items\"}],\"header\":\"Hi All\",\"footer\":\"This is footer\",\"sampleText\":\"Dear Customer, Here are our products. \\\\nThanks for shopping with us\",\"sampleHeader\":\"Hi All\",\"enableSample\":true,\"editTemplate\":false,\"allowTemplateCategoryChange\":true,\"addSecurityRecommendation\":false}", "createdOn": 1710799689011, "data": "Hi All\\nDear Customer, Here are our products. \\nThanks for shopping with us\\nThis is footer | [View items]", "elementName": "automation_template_439231", "id": "1f7871fc-2933-41dd-8f67-ab2a75f055fa", "languageCode": "en", "languagePolicy": "deterministic", "meta": "{\"example\":\"Dear Customer, Here are our products. \\\\nThanks for shopping with us\"}", "modifiedOn": 1710799689011, "namespace": "9c7fe92f_2a48_40ec_83d0_69c62a772433", "priority": 1, "quality": "UNKNOWN", "retry": 0, "stage": "NONE", "status": "PENDING", "templateType": "TEXT", "vertical": "Internal_vertical", "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 the Issue still persists then contact Gupshup Dev Support" }For any Internal Error
Language
Click Try It! to start a request and see the response here!