Catalog

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

Request Parameters

KeyDescriptionValueData TypeRequired/Optional Constraints

Authorization

Access Token for the application

{{PARTNER_APP_TOKEN}}

String

Required

Should be a valid Partner App Access Token

elementName

The name of a template. The element name is unique for a WABAs namespace.

{{ELEMENT_NAME}}

String

Required

elementName (not more than 180 char.) Mandatory fields

languageCode

Language code for the template. Refer to all the language codes here.

{{LANGUAGE_CODE}}

String

Optional

languageCode default value : en_US

content

The body of the template.

{{CONTENT}}

String

Required

content (not more than 1024 char.)

category

The category of your template.

{{CATEGORY}}

String

Required

Category Type: MARKETING UTILITY

vertical

TEXT

{{VERTICAL}}

String

Required

vertical (not more than 180 char.)

templateType

CATALOG

{{TEMPLATE_TYPE}}

String

Required

The type of template: CATALOG

example

Template Example

{{EXAMPLE}}

String

Required

allowTemplateCategoryChange

Boolean value. If True, Meta will automatically update the template category as per the template content. The default value is False.

{{ALLOW_TEMPLATE_CATEGORY_CHANGE}}

true/false

Optional

appId

App ID to fetch the access token

{{APP_ID}}

String

Required

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

Sample Request

curl --location --request POST 'https://partner.gupshup.io/partner/app/{{APP_ID}}/templates' \
--header 'Authorization: {{PARTNER_APP_TOKEN}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'elementName={{ELEMENT_NAME}}' \
--data-urlencode 'languageCode={{LANGUAGE_CODE}}' \
--data-urlencode 'content={{CONTENT}}' \
--data-urlencode 'category={{CATEGORY}}' \
--data-urlencode 'vertical={{VERTICAL}}' \
--data-urlencode 'templateType={{TEMPLATE_TYPE}}' \
--data-urlencode 'example={{EXAMPLE}}' \
--data-urlencode 'allowTemplateCategoryChange={{ALLOW_TEMPLATE_CATEGORY_CHANGE}}'

Sample Response

{
    "status": "success",
    "template": {
        "appId": "a41b30f4-d202-4fdb-911e-3a8fbfbfb797",
        "buttonSupported": "CLG",
        "category": "MARKETING",
        "containerMeta": "{\"appId\":\"a41b30f4-d202-4fdb-911e-3a8fbfbfb797\",\"data\":\"Dear BatMan, here are our products.\",\"buttons\":[{\"type\":\"CATALOG\",\"text\":\"View catalog\"}],\"sampleText\":\"Dear BatMan, here are our products.\",\"enableSample\":true,\"editTemplate\":false,\"allowTemplateCategoryChange\":true,\"addSecurityRecommendation\":false}",
        "createdOn": 1710799900239,
        "data": "Dear BatMan, here are our products. | [View catalog]",
        "elementName": "automation_template_503642",
        "id": "09c335c2-f9a5-44b7-b544-2e4be761840b",
        "languageCode": "en",
        "languagePolicy": "deterministic",
        "meta": "{\"example\":\"Dear BatMan, here are our products.\"}",
        "modifiedOn": 1710799900239,
        "namespace": "9c7fe92f_2a48_40ec_83d0_69c62a772433",
        "priority": 1,
        "quality": "UNKNOWN",
        "retry": 0,
        "stage": "NONE",
        "status": "PENDING",
        "templateType": "CATALOG",
        "vertical": "Internal_vertical",
        "wabaId": "104505526065633"
    }
}

Status Codes

Status CodeResponseComment
Success
200{ "status": "success", "template": { "appId": "a41b30f4-d202-4fdb-911e-3a8fbfbfb797", "buttonSupported": "CLG", "category": "MARKETING", "containerMeta": "{\"appId\":\"a41b30f4-d202-4fdb-911e-3a8fbfbfb797\",\"data\":\"Dear BatMan\\\\nHere are our products.\",\"buttons\":[{\"type\":\"CATALOG\",\"text\":\"View catalog\"}],\"sampleText\":\"Dear BatMan\\\\nHere are our products.\",\"enableSample\":true,\"editTemplate\":false,\"allowTemplateCategoryChange\":true,\"addSecurityRecommendation\":false}", "createdOn": 1715598979361, "data": "Dear BatMan\\nHere are our products. | [View catalog]", "elementName": "auto_cattemplate", "id": "a4a77e59-f305-4964-bfad-5dcb0a7d1aa9", "languageCode": "en", "languagePolicy": "deterministic", "meta": "{\"example\":\"Dear BatMan\\\\nHere are our products.\"}", "modifiedOn": 1715598979361, "namespace": "9c7fe92f_2a48_40ec_83d0_69c62a772433", "priority": 1, "quality": "UNKNOWN", "retry": 0, "stage": "NONE", "status": "PENDING", "templateType": "CATALOG", "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 Issue still persist than contact Gupshup Dev Support" }For any Internal Error
Path Params
string
required

Unique identifier of the app.

Form Data
string
required

The name of a template. Element name is unique for a WABAs namespace.

string

Language code for the template. Refer to all the language codes here.

string
required

The body of the template.

string
required

The category of your template.

string
required

vertical (not more than 180 char.)

string
required

The type of template

string
required

Template Example

boolean

Boolean value. If True, Meta will automatically update the category of the template as per the template content. Default value is False.

boolean

Boolean value

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