Use Universal Token (UT) in Authorization. Content-Type: application/x-www-form-urlencoded. One endpoint serves every template type — the type is chosen with the templateType field, and the rest of the form changes with it. Every type below has its own named cURL in the code-samples panel, and the matching field set under Examples on the request body: | # | Example | templateType | Distinguishing fields |
|---|---------|--------------|-----------------------|
| 1 | Text — marketing | TEXT | header, footer, buttons |
| 2 | Text — named parameters | TEXT | parameterFormat=NAMED, messageValidity |
| 3 | Image header | IMAGE | exampleMedia |
| 4 | Video header | VIDEO | exampleMedia |
| 5 | Document header | DOCUMENT | exampleMedia |
| 6 | Location header | LOCATION | pin supplied at send time |
| 7 | Carousel | CAROUSEL | cards |
| 8 | Catalog | CATALOG | CATALOG button |
| 9 | Product (MPM) | PRODUCT | MPM button |
| 10 | Limited-time offer | TEXT | isLTO, hasExpiration, limitedOfferText, COPY_CODE button |
| 11 | Authentication OTP | TEXT + category=AUTHENTICATION | codeExpirationMinutes, OTP buttons |
| 12 | GIF | GIF | mediaId + mediaUrl |
| 13 | PIX payment (Brazil) | TEXT | sendAsPixTemplate, ORDER_DETAILS button |
| 14 | Contact-info button | TEXT + category=UTILITY | PHONE_NUMBER button in buttons | The contact-info button (example 14) renders as Call phone number in WhatsApp. It is a Meta template button type, not a Meta resource, so it needs no separate call — it travels in the ordinary buttons array. Allowed on UTILITY and MARKETING templates (not AUTHENTICATION); at most one per template, and it can be combined with QUICK_REPLY and URL buttons. A MARKETING template takes the identical buttons value — only category changes. Media types reference an example asset by handle — upload it first with POST /partner/bizgate/app/{appId}/upload/media and pass the returned handle as exampleMedia. GIF is the exception and takes mediaId + mediaUrl. ### Runnable cURL per template type
1. Text — marketing, with header, footer and buttons
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=order_confirmation_v1' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=TEXT' \ --data-urlencode 'vertical=Order update' \ --data-urlencode 'header=Order confirmed' \ --data-urlencode 'content=Hi {{1}}, your order {{2}} is confirmed and ships today.' \ --data-urlencode 'footer=Reply STOP to opt out' \ --data-urlencode 'example=Hi Ana, your order #10482 is confirmed and ships today.' \ --data-urlencode 'exampleHeader=Order confirmed' \ --data-urlencode 'buttons=[{"type":"QUICK_REPLY","text":"Track order"},{"type":"URL","text":"View order","url":"https://shop.example.com/orders/{{1}}","example":["https://shop.example.com/orders/10482"]}]' \ --data-urlencode 'enableSample=true' \ --data-urlencode 'allowTemplateCategoryChange=false' 2. Text — named parameters
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=appointment_reminder_named' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=UTILITY' \ --data-urlencode 'templateType=TEXT' \ --data-urlencode 'vertical=Appointment update' \ --data-urlencode 'content=Hi {{customer_name}}, your appointment is on {{appointment_date}} at {{branch}}.' \ --data-urlencode 'footer=Need to reschedule? Just reply.' \ --data-urlencode 'example=Hi Ana, your appointment is on 12 Aug at Bandra West.' \ --data-urlencode 'parameterFormat=NAMED' \ --data-urlencode 'enableSample=true' \ --data-urlencode 'messageValidity=43200' 3. Image header
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=monsoon_sale_banner' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=IMAGE' \ --data-urlencode 'vertical=Promotion' \ --data-urlencode 'content=Monsoon sale is live — up to {{1}}% off until {{2}}.' \ --data-urlencode 'footer=T&Cs apply' \ --data-urlencode 'example=Monsoon sale is live — up to 40% off until 31 Aug.' \ --data-urlencode 'exampleMedia=4::aW1hZ2UvanBlZw==:ARb4kR2mExampleHandle' \ --data-urlencode 'enableSample=true' \ --data-urlencode 'allowTemplateCategoryChange=false' 4. Video header
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=product_demo_video' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=VIDEO' \ --data-urlencode 'vertical=Promotion' \ --data-urlencode 'content=See how {{1}} works in 30 seconds.' \ --data-urlencode 'footer=Gupshup' \ --data-urlencode 'example=See how SmartHub works in 30 seconds.' \ --data-urlencode 'exampleMedia=4::dmlkZW8vbXA0:ARb4kR2ExampleVideoHandle' \ --data-urlencode 'enableSample=true' 5. Document header
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=monthly_invoice' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=UTILITY' \ --data-urlencode 'templateType=DOCUMENT' \ --data-urlencode 'vertical=Billing' \ --data-urlencode 'content=Hi {{1}}, your invoice for {{2}} is attached. Amount due: {{3}}.' \ --data-urlencode 'footer=Questions? Reply to this message.' \ --data-urlencode 'example=Hi Ana, your invoice for July 2026 is attached. Amount due: ₹4,820.' \ --data-urlencode 'exampleMedia=4::YXBwbGljYXRpb24vcGRm:ARb4kR2ExamplePdfHandle' \ --data-urlencode 'enableSample=true' 6. Location header
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=store_pickup_location' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=UTILITY' \ --data-urlencode 'templateType=LOCATION' \ --data-urlencode 'vertical=Order update' \ --data-urlencode 'content=Your order {{1}} is ready for pickup. Tap the pin for directions.' \ --data-urlencode 'footer=Open 10am-8pm' \ --data-urlencode 'example=Your order #10482 is ready for pickup. Tap the pin for directions.' \ --data-urlencode 'enableSample=true' 7. Carousel
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=new_arrivals_carousel' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=CAROUSEL' \ --data-urlencode 'vertical=Promotion' \ --data-urlencode 'content=Hi {{1}}, this week'"'"'s new arrivals are here.' \ --data-urlencode 'example=Hi Ana, this week'"'"'s new arrivals are here.' \ --data-urlencode 'cards=[{"headerType":"IMAGE","exampleMedia":"4::aW1hZ2UvanBlZw==:ARb4Card1","body":"{{1}} — now {{2}}","example":["Linen shirt","₹1,299"],"buttons":[{"type":"URL","text":"Buy now","url":"https://shop.example.com/p/{{1}}","example":["https://shop.example.com/p/linen-shirt"]}]},{"headerType":"IMAGE","exampleMedia":"4::aW1hZ2UvanBlZw==:ARb4Card2","body":"{{1}} — now {{2}}","example":["Canvas tote","₹899"],"buttons":[{"type":"QUICK_REPLY","text":"Notify me"}]}]' \ --data-urlencode 'enableSample=true' 8. Catalog
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=browse_full_catalog' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=CATALOG' \ --data-urlencode 'vertical=Promotion' \ --data-urlencode 'content=Hi {{1}}, our full festive range is now in the catalog.' \ --data-urlencode 'footer=Tap below to browse' \ --data-urlencode 'example=Hi Ana, our full festive range is now in the catalog.' \ --data-urlencode 'buttons=[{"type":"CATALOG","text":"View catalog"}]' \ --data-urlencode 'enableSample=true' 9. Product — multi-product message
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=recommended_for_you_mpm' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=PRODUCT' \ --data-urlencode 'vertical=Promotion' \ --data-urlencode 'header=Picked for you' \ --data-urlencode 'content=Hi {{1}}, here are {{2}} items we think you'"'"'ll like.' \ --data-urlencode 'footer=Prices include GST' \ --data-urlencode 'example=Hi Ana, here are 3 items we think you'"'"'ll like.' \ --data-urlencode 'exampleHeader=Picked for you' \ --data-urlencode 'buttons=[{"type":"MPM","text":"View items"}]' \ --data-urlencode 'enableSample=true' 10. Limited-time offer
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=flash_sale_lto' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=TEXT' \ --data-urlencode 'vertical=Promotion' \ --data-urlencode 'content=Hi All, Here are our products.' \ --data-urlencode 'example=Hi All, Here are our products.' \ --data-urlencode 'isLTO=true' \ --data-urlencode 'hasExpiration=true' \ --data-urlencode 'limitedOfferText=offer limited' \ --data-urlencode 'buttons=[{"type":"COPY_CODE","example":"250FF"},{"type":"URL","text":"Shop Now","url":"https://www.luckyshrub.com/shop?promo={{1}}","example":["summer2023"]}]' \ --data-urlencode 'allowTemplateCategoryChange=false' \ --data-urlencode 'enableSample=false' 11. Authentication — OTP with copy-code and one-tap
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=login_otp_v2' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=AUTHENTICATION' \ --data-urlencode 'templateType=TEXT' \ --data-urlencode 'vertical=Account verification' \ --data-urlencode 'content={{1}} is your verification code.' \ --data-urlencode 'example=482913 is your verification code.' \ --data-urlencode 'addSecurityRecommendation=true' \ --data-urlencode 'codeExpirationMinutes=10' \ --data-urlencode 'buttons=[{"type":"OTP","otp_type":"COPY_CODE","text":"Copy code"},{"type":"OTP","otp_type":"ONE_TAP","text":"Autofill","autofill_text":"Autofill","package_name":"com.example.myapplication","signature_hash":"K8a%2FAINcGX7"}]' \ --data-urlencode 'enableSample=true' 12. GIF
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=avida_gif_template' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=GIF' \ --data-urlencode 'vertical=update_shop' \ --data-urlencode 'content=This is my first GIF template' \ --data-urlencode 'footer=Hello GIF' \ --data-urlencode 'example=This is my first GIF template' \ --data-urlencode 'mediaId=8fa96b2c-744e-4acf-bc98-9d4cd66bdd34' \ --data-urlencode 'mediaUrl=https://media.example.com/samples/sample01.mp4' \ --data-urlencode 'enableSample=true' 13. PIX payment (Brazil)
bash curl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer <UT>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'elementName=pix_payment_request' \ --data-urlencode 'languageCode=en' \ --data-urlencode 'category=MARKETING' \ --data-urlencode 'templateType=TEXT' \ --data-urlencode 'vertical=Payment request' \ --data-urlencode 'header=Order' \ --data-urlencode 'content=Please Pay to continue subscription' \ --data-urlencode 'footer=Thankyou' \ --data-urlencode 'example=Please Pay to continue subscription' \ --data-urlencode 'exampleHeader=Order' \ --data-urlencode 'buttons=[{"type":"ORDER_DETAILS","text":"Copy Pix code"}]' \ --data-urlencode 'sendAsPixTemplate=true' \ --data-urlencode 'enableSample=false' \ --data-urlencode 'parameterFormat=POSITIONAL' \ --data-urlencode 'checkerApprovalRequired=false' 14. Contact-info button (Utility / Marketing)
```bashcurl --request POST \ --url 'https://partner.gupshup.io/partner/bizgate/app/6f414190-d45c-4671-bca1-fb6c3018cb13/template' \ --header 'Authorization: Bearer
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||