Pix Template

This API creates Pix Templates

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

If the waba is in Brazil then user has to use sendAsPixTemplate and button text would be Copy Pix code.

Parameters

KeyDescriptionValueData typeRequired/OptionalConstraints
AuthorizationAccess Token for the application{PARTNER_APP_TOKEN}StringRequired• Should 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. Element name is unique for a WABAs namespace.{ELEMENT_NAME}StringRequired• elementName (not more than 200 char.) Mandatory fields
languageCode

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

here

.

{LANGUAGE_CODE}Stringoptional• languageCode 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.StringNA• content (not more than 1024 char.)
categoryThe category of your template. Possible Values: MARKETING and UTILITY.StringNA• category (not more than 180 char.)
verticalTEXTStringNAvertical (not more than 180 char.)
templateTypeTEXT/IMAGEStringNA

The type of template: TEXT, IMAGE, LOCATION, PRODUCT, CATALOG, LTO, CAROUSEL, VIDEO & DOCUMENTCATALOG, LTO, CAROUSEL templates are not available with the On-premises API

CATALOG, LTO, CAROUSEL and PRODUCT templates are available for MARKETING & UTILITY category only.Cards to be cards only to be passed if template type is CAROUSEL

exampleTemplate ExampleStringNA
enableSampleRequired for creating all types of templatestrue/falseNAif enableSample is true then exampleMedia
headerHeader of the template. Applicable for templateType = Text Character limit: 60. Not applicable for "Authentication" category.StringNA
footerFooter of the template. Character limit: 60. Not applicable for "Authentication" category, only set based on code_expiration_minutes valueStringNA
buttons[{"type":"ORDER_DETAILS","text":"Copy Pix code"}]Array of objectsNA
exampleHeaderThis is the headerStringNA
sendAsPixTemplatetrueBooleanRequired
parameterFormatPOSITIONALStringRequired

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/926470c5-d617-43b3-aea4-2c2a389dc9d4/templates' \
--header 'accept: application/json, text/plain, */*' \
--header 'content-type: application/x-www-form-urlencoded' \
--header 'Authorization: sk_0b3a6cf96e8axxxxb2' \
--data-urlencode 'elementName=test_copypix_temp' \
--data-urlencode 'languageCode=en' \
--data-urlencode 'content=Please Pay to continue subscription' \
--data-urlencode 'category=MARKETING' \
--data-urlencode 'vertical=Test01' \
--data-urlencode 'templateType=TEXT' \
--data-urlencode 'example=Please Pay to continue subscription' \
--data-urlencode 'exampleHeader=Order' \
--data-urlencode 'enableSample=false' \
--data-urlencode 'parameterFormat=POSITIONAL' \
--data-urlencode 'checkerApprovalRequired=false' \
--data-urlencode 'footer=Thankyou' \
--data-urlencode 'header=Order' \
--data-urlencode 'buttons=[{"type":"ORDER_DETAILS","text":"Copy Pix code"}]' \
--data-urlencode 'sendAsPixTemplate=true'

Sample Response

{
    "status": "success",
    "template": {
        "appId": "926470c5-d617-43b3-aea4-2c2a389dc9d4",
        "buttonSupported": "OD",
        "category": "MARKETING",
        "containerMeta": "{\"appId\":\"926470c5-d617-43b3-aea4-2c2a389dc9d4\",\"data\":\"Please Pay to continue subscription\",\"buttons\":[{\"type\":\"ORDER_DETAILS\",\"text\":\"Copy Pix code\"}],\"header\":\"Order\",\"footer\":\"Thankyou\",\"sampleText\":\"Please Pay to continue subscription\",\"sampleHeader\":\"Order\",\"enableSample\":true,\"editTemplate\":false,\"allowTemplateCategoryChange\":false,\"addSecurityRecommendation\":false,\"isCPR\":false,\"cpr\":false}",
        "createdOn": 1765985415929,
        "data": "Order\nPlease Pay to continue subscription\nThankyou | [Copy Pix code]",
        "elementName": "test_copypix_temp_vini",
        "id": "c8d28b6f-0939-4260-9352-d10e76709c9f",
        "languageCode": "en",
        "languagePolicy": "deterministic",
        "meta": "{\"example\":\"Please Pay to continue subscription\"}",
        "modifiedOn": 1765985415929,
        "namespace": "b01e6d56_443a_419e_9e2f_1559e7b31309",
        "parameterFormat": "POSITIONAL",
        "priority": 1,
        "quality": "UNKNOWN",
        "retry": 0,
        "stage": "NONE",
        "status": "PENDING",
        "templateType": "TEXT",
        "vertical": "Test01",
        "wabaId": "914254047448183"
    }
}

Status codes

Status CodeResponseComments
Success
200{
"status": "success","template":{"appId": "bf9ee64c-3d4d-4ac4-8668-732e577007c4","category": "MARKETING","containerMeta": "{"appId":"bf9ee64c-3d4d-4ac4-8668-732e577007c4","data":"This is category for copy code button template.","footer":"This is footer","sampleText":"This is category for copy code button template.","enableSample":true,"editTemplate":false,"addSecurityRecommendation":false}","createdOn": 1708205191624,"data": "This is category for copy code button template.\nThis is footer","elementName": "automation_template_2956534","id": "e8e837c2-a3a8-4845-958f-ec7febb54aec","languageCode": "en","languagePolicy": "deterministic","meta": "{"example":"This is category for copy code button template."}","modifiedOn": 1708205191624,"namespace": "18cfa544_9c62_4dcd_b8f3_b3785d8c917c","priority": 1,"quality": "UNKNOWN","retry": 0,
"stage": "NONE",
"status": "PENDING",
"templateType": "TEXT",
"vertical": "Internal_vertical",
"wabaId": "216141188246170"
}
}
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, then contact Gupshup Dev Support"}

For any Internal Error
Path Params
uuid
required

Unique identifier of the partner app

Form Data
string
required
string
required
string
required
string
required
string
string
required
string
string
boolean
string
boolean
string
string
string

JSON string representing buttons configuration

boolean
Headers
string
required

Partner App Access Token

Responses

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