here you can create a template for a particular app.
you will need below details to start using this api.
1. app Id
2. app token
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
token | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
elementName | ticket_check_url_334 | The name of a template. Element name is unique for a WABAs namespace. |
languageCode | en_US | Language code for the template. Refer to all the language codes here. |
category | MARKETING | The category of your template. Possible Values: AUTHENTICATION , MARKETING and UTILITY . If you submit the templates with the any other categories, you will receive an error Invalid category provided, kindly use category from these option AUTHENTICATION, MARKETING, UTILITY . |
templateType |
TEXT Carousel
LTO
|
The type of template: TEXT, IMAGE, LOCATION, PRODUCT, CATALOG, LTO, CAROUSEL, VIDEO & DOCUMENT CATALOG, 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 |
isLTO | LTO creation param | Needs to be true in order to create LTO templates |
limitedOfferText | LTO text | Limited offer text can have Maximum 16 characters |
hasExpiration | Set true to add expiration to LTO templates | Copy code button component required if "has_expiration" is set to true |
Cards | card list |
Either of mediaUrl, mediaId or exampleMedia is required. If exampleMedia is not provided, the handleId / exampleMedia will be generated in the backend using the mediaUrl / mediaId.
|
vertical | TEXT | Character limit: 180 |
content | your ticket has been confirmed for {{1}} persons on date {{2}}. | The body of the template. Character limit: 1028. For "Authentication" category the first line should be - {{1}} is your verification code. |
header | This is the header. | Header of the template. Applicable for templateType = Text Character limit: 60. Not applicable for "Authentication" category. |
footer | This is the footer | Footer of the template. Character limit: 60. Not applicable for "Authentication" category, only set based on code_expiration_minutes value |
buttons |
Copy code example
Authentication category example
Button list example
|
Used only if your template has a CTA. An example is also submitted if a URL button has variable parameter. For "Authentication" category OTP button type is supported with two otp_type:
If otp_type is set to ONE_TAP, three additional parameters are required:
UTILITY templates cannot use COPY_CODE Marketing template now have support for
Copy Code - Allows users to copy the code from the message. Only one copy code button is allowed in one template Marketing and Utility templates have support for Button list Button List - Allows upto 10 buttons to be embedded in the template. Sublimits
|
example | your ticket has been confirmed for 4 persons on date 2020-05-04. | An example of the template. |
enableSample | true | Required for creating all types of templates. |
allowTemplateCategoryChange | false | Boolean value. If True, Meta will automatically update the category of the template as per the template content. Default value is False. If the category gets updated, you can view the oldCategory from the Get Templates API |
exampleHeader | This is the header | |
addSecurityRecommendation | true | Optionally for "Authentication" category a security disclaimer is added to content - For your security, do not share this code |
codeExpirationMinutes | integer | Optionally for "Authentication" category the following text is added to footer - This code expires in <NUM_MINUTES> minutes. Code expiry time should be between 1 and 90 minutes. |
|
Using this API, you can create and submit a template along with a Sample Media. You will need below details to start using this API.
Key | Value | Description |
---|---|---|
token | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
elementName | ticket_check_url_334 | |
languageCode | en_US | |
content | Your verification code is {{1}}. | |
footer | This is the footer | Footer of the template. Character limit: 60 |
category | MARKETING | The category of your template. Possible Values: AUTHENTICATION , MARKETING and UTILITY . If you submit the templates with the any other categories, you will receive an error Invalid category provided, kindly use category from these option AUTHENTICATION, MARKETING, UTILITY . |
templateType | IMAGE | |
vertical | Ticket update | |
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 | |
example | Your verification code is 213. | |
exampleMedia | 4::aW1hZ2UvcadG5n:ARYaMMMA2QvIXuQZdPjWVXTOqfoBU3n0L1Ftyg4w57yxi9nD105yQDvW2nu3-HNo9HGefxZ-Ig-HAi3YSsckwIsOEUwxSPatsxT0Niob30E63A:e:1634884682:2281283925530161:100033655335566:ARaBAxW-1L-ZRu6SMSg |
This is the handleId. |
enableSample | true | Required when submitting CTA template with variables. |
allowTemplateCategoryChange | false | Boolean value. If True, Meta will automatically update the category of the template as per the template content. Default value is False. If the category gets updated, you can view the oldCategory from the Get Templates API |
|
Using this API, you can upload your sample media and generate a handleId
for it. Using the handleId
, you can create and submit a template along with a sample media. The handleId is passed in the exampleMedia
parameter of the Apply for templates with sample media API. You will need below details to start using this API.
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
file | @"/C:/Users/Pictures/sample.png" | Upload a file from your local machine. |
file_type | image/png |
|
Using this API you can get the list of templates for a an app. You will get the rejection reason for templates.
The following details are required to start using this API.
oldCategory
, and the new category will be associated with the parameter category
. You will not see the oldCategory
parameter until the new category is received. You will also receive a template category-update
event on your callback URL notifying of the change. Learn more about it here.
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
token | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
{
"status": "success",
"templates": [
{
"appId": "24840ba3-f488-4c10-9ef2-ba23e3jn63d9",
"category": "MARKETING",
"createdOn": 1671619377053,
"data": "Happiness & Growth is all we wish for you this Holiday season.\nHappy Holidays & a happy New Year 2023.",
"elementName": "mrry_chis",
"externalId": "703981077764591",
"id": "00b298d7-5c63-4788-9b66-b821i3ae5ccd",
"internalCategory": 0,
"internalType": 0,
"languageCode": "en",
"languagePolicy": "deterministic",
"meta": "{\"example\":\"Happiness & Growth is all we wish for you this Holiday season.\\nHappy Holidays & a happy New Year 2023.\"}",
"modifiedOn": 1678794041479,
"namespace": "ef160bf3_e5c4_42de_9803_209f1n90d81b",
"priority": 1,
"quality": "UNKNOWN",
"retry": 0,
"stage": "NONE",
"status": "APPROVED",
"templateType": "VIDEO",
"vertical": "account update",
"wabaId": "1577800082372507"
},
{
"appId": "24840ba3-f488-4c10-9ef2-ba23e3jn63d9",
"category": "UTILITY",
"createdOn": 1657531748839,
"data": "Hi {{1}}\n\nYou have received {{1}} catalog from {{2}} which will expire in {{3}} hours.\n\nSelect your designs before its too late. | [View Catalog,https://app.tanika.tech/{{1}}]",
"elementName": "tanika_supplier_ts_gs_7",
"id": "00e1ee5a-b815-4aa3-874d-292nu36c54b1",
"internalCategory": 0,
"internalType": 0,
"languageCode": "en",
"languagePolicy": "deterministic",
"meta": "{\"example\":\"Hi [*User*]\\n\\nYou have received [*1234*] catalog from [*5678*] which will expire in [*1800*] hours.\\n\\nSelect your designs before its too late.\"}",
"modifiedOn": 1657531749100,
"namespace": "ef160bf3_e5c4_42de_9803_209f1n90d81b",
"priority": 1,
"quality": "UNKNOWN",
"reason": "component of type BODY is missing expected field(s) (example)",
"retry": 0,
"stage": "NONE",
"status": "REJECTED",
"templateType": "TEXT",
"vertical": "ACCOUNT_UPDATE",
"wabaId": "1577800082372507"
}
]
}
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
source | 918910567700 | |
sandbox | false | |
destination | 918286836492 | |
template |
|
MPM Template
Catalog Template
|
src.name | GupshupDevAssistant01 | |
message |
Location {"type":"location","location":{"name":"1513 Farnum Road","address":"New York 10019","longitude":-79.0896492,"latitude":42.5950661}}LTO
|
Required when templateType is 'LOCATION' Add video or image id/link for media LTO templates |
|
Using this API, you can edit a template using the templateId
.
You will need below details to start using this API.
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
content | This is the content | TEXT: The body of the template. Character limit: 1028 |
templateType | TEXT | The type of template: TEXT, IMAGE, LOCATION, PRODUCT, CATALOG, VIDEO & DOCUMENT |
example | your ticket has been confirmed for 4 persons on date 2020-05-04 | TEXT - An example of the template. |
enableSample | true | BOOLEAN: True or False. Required for creating all types of templates. |
header | This is the header | Header of the template. Applicable for templateType = Text Character limit: 60 |
footer | This is the footer | Footer of the template. Character limit: 60 |
buttons | [{"type":"PHONE_NUMBER","text":"Call Us","phone_number":"+xxxxxxxxxxx"},{"type":"URL","text":"Book A Demo","url":"https://bookins.gupshup.io/{{1}}","example":["https://bookins.gupshup.io/abc"]}] | Used only if your template has a CTA. An example is also submitted if a URL button has variable parameter. |
exampleMedia | 4::aW1hZ2UvcadG5n:ARYaMMMA2QvIXuQZdPjWVXTOqfoBU3n0L1Ftyg4w57yxi9nD105yQDvW2nu3-HNo9HGefxZ-Ig-HAi3YSsckwIsOEUwxSPatsxT0Niob30E63A:e:1634884682:2281283925530161:100033655335566:ARaBAxW-1L-ZRu6SMSg |
Get handleId from here |
mediaId | TEXT | Media ID |
mediaUrl | TEXT | Media URL |
category | AUTHENTICATION | Use category from these option AUTHENTICATION, MARKETING, UTILITY in description. |
|
Using this API, you can delete a template using the elementName
for it. You will need below details to start using this API.
NOTE: This action is irreversible. Once a template has been deleted, it cannot be restored.
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 | |
elementName | order_update |
|
this api will provide the access token for accessing particular app.
you can use this token to get app’s templates , submit templates, send messages etc.
you will need below details to start using this api.
1. partner token
Key | Value | Description |
---|---|---|
token | {{PARTNER_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
|
You have to first use this api to get the token, this will help you in accessing other apis.
currently expirey for the token is 24 hours.
Key | Value | Description |
---|---|---|
shahsharad1111@gmail.com | ||
password | sharad |
|
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
token | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
phone | 918286836492 | |
isBlocked | true |
|
Using this API, you can enable or disable template messaging for an App. You will need below details to start using this API.
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded | |
Connection | keep-alive | |
token | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
isHSMEnabled | true | Possible values: true or false
|
|
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
phone | 918286836492 | |
isBlocked | true |
|
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
token | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
phone | 918286831212 |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
|
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
token | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
|
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appID | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
phone | 918286836492 |
|
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
The response of this endpoint will be
|
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_TOKEN}} |
Key | Value | Description |
---|---|---|
apiKey | 7e411e0332704866c83b94df2eaa2054 | |
appName | assistant0092 |
|
This api will provide you the list of Apps which are linked to your account.
Required parameter is only ‘partner token’.
you will need app id and app access token in order to access app related apis and this api will help you get the id for the app.
Key | Value | Description |
---|---|---|
token | {{PARTNER_TOKEN}} |
|
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded | |
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97850d-add3-4557-1535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
callbackUrl | https://webhook.site/f9858e13-3fea-4561-b0de-9592dff5d970 | Learn how you can successfully set a callback URL for an app. |
|
Using this API, you can update the gupshup fee cap for an app
Key | Value | Description |
---|---|---|
Connection | keep-alive | |
token | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
appId | 9e97650d-add3-4557-9535-4cdf47c3fa68 |
Key | Value | Description |
---|---|---|
cap | 100 | Values supported between: 50 to 750 |
|
Using this API you can get the daily usage breakdown for a particular app ranging between two dates.
Key | Value | Description |
---|---|---|
token | sk_19eew348befyg27057fa1ff999869f | Partner app token |
Key | Value | Description |
---|---|---|
from | 2022-03-01 | date in YYYY-MM-DD format. |
to | 2022-04-01 | date in YYYY-MM-DD format. |
Key | Value | Description |
---|---|---|
appId | 832a9f7-aa33-4aad-8b67-c23d81263 |
Note: cumulativeBill, discount, gsCap not applicable for postpaid apps |
Using this API you can get the daily discount, daily bill, and the cumulative bill for a particular app ranging a month.
Key | Value | Description |
---|---|---|
token | sk_19eew348befyg27057fa1ff999869f | Partner app token |
Key | Value | Description |
---|---|---|
year | 2022 | Year in YYYY format. |
month | 04 | Month in MM format. |
Key | Value | Description |
---|---|---|
appId | 832a9f7-aa33-4aad-8b67-c23d81263 |
|
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded | |
Authorization | {{app_token}} |
Key | Value | Description |
---|---|---|
appId | 9e97850d-add3-4557-1535-4hdy7c3fa68 |
Key | Value | Description |
---|---|---|
enableOptinMessage | False | to enable the Automated Optin message. |
enableOptinMessage | True | to disable the Automated Optin message. |
Status: 202 Accepted |
Key | Value | Description |
---|---|---|
Content-Type | application/x-www-form-urlencoded | |
Authorization | {{app_token}} |
Key | Value | Description |
---|---|---|
appId | 9e97850d-add3-4557-1535-4hdy7c3fa68 |
Key | Value | Description |
---|---|---|
modes | READ | Update inbound events that you want to receive on your App's callback URL. You may provide all the values for which you want to receive events. If no values are provided, all events will be deselected. Possible values - DLR events: DELIVERED , READ , SENT , DELETED , and OTHERS . System events: TEMPLATE and ACCOUNT . |
Status: 204 Accepted
|
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
|
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
|
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
addLine1 | 123 | |
addLine2 | panvel | |
city | mumbai | |
state | maharastra | |
pinCode | 123 | |
country | india | |
vertical | saloon | |
website1 | 123.com | |
website2 | 123.com | |
desc | see desc | |
profileEmail | 123@gmail.com |
|
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
about | Whatsapp Business |
|
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
|
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
Key | Value | Description |
---|---|---|
image | /path/to/file |
|
Key | Value | Description |
---|---|---|
Authorization | {{PARTNER_APP_TOKEN}} |
|