Get Templates from Library

Use this API to fetch pre approved Meta Library Templates

Request Parameters

KeyDescriptionConstraints
PARTNER_APP_TOKENApp Access Token issued post partner loginShould be a valid partner app access token belonging to the passed appId
elementNameName of elementMeta library template name - Optional
industryName of industryPossible values E_COMMERCE, FINANCIAL_SERVICES - Optional
languageCodeLanguage code of the meta library templateSupported Languages - WhatsApp Business Management API - Documentation - Meta for Developers - Optional
topicTopic of the meta library templatePossible values ACCOUNT_UPDATES, CUSTOMER_FEEDBACK, ORDER_MANAGEMENT, PAYMENTS - Optional
usecaseUsecase of the meta library templatePossible values ACCOUNT_CREATION_CONFIRMATION, AUTO_PAY_REMINDER, DELIVERY_CONFIRMATION, DELIVERY_FAILED, DELIVERY_UPDATE, FEEDBACK_SURVEY, FIXED_TEMPLATE_PRICE_TEST, FRAUD_ALERT, LOW_BALANCE_WARNING, ORDER_ACTION_NEEDED, ORDER_CONFIRMATION, ORDER_DELAY, ORDER_OR_TRANSACTION_CANCEL, ORDER_PICK_UP, PAYMENT_ACTION_REQUIRED, PAYMENT_CONFIRMATION, PAYMENT_DUE_REMINDER, PAYMENT_NOTICE, PAYMENT_OVERDUE, PAYMENT_REJECT_FAIL, PAYMENT_SCHEDULED, RECEIPT_ATTACHMENT, RETURN_CONFIRMATION, SHIPMENT_CONFIRMATION, STATEMENT_ATTACHMENT, STATEMENT_AVAILABLE, TRANSACTION_ALERT - Optional
appIdApp Id for the app that is linked to the Partner Account

Sample Request

curl --location 'https://partner.gupshup.io/partner/app/:appId/template/metalibrary?elementName=&industry=&languageCode=&topic=&usecase=' \
--header 'Authorization : {{PARTNER_APP_TOKEN}}'

Sample Response

{
    "status": "success",
    "templates": [
        {
            "category": "UTILITY",
            "containerMeta": "{\"data\":\"Hei, {{1}}\\n\\nDen nye kontoen din er opprettet.\\n\\nBekreft {{2}} for å fullføre profilen.\",\"buttons\":[{\"type\":\"URL\",\"text\":\"Bekreft konto\",\"url\":\"https://www.example.com\"}],\"header\":\"Fullfør konfigurering av konto\",\"sampleText\":\"Hei, [John]\\n\\nDen nye kontoen din er opprettet.\\n\\nBekreft [e-postadressen din] for å fullføre profilen.\",\"sampleHeader\":\"Fullfør konfigurering av konto\",\"enableSample\":false,\"editTemplate\":false,\"allowTemplateCategoryChange\":false,\"addSecurityRecommendation\":false}",
            "data": "Hei, {{1}}\n\nDen nye kontoen din er opprettet.\n\nBekreft {{2}} for å fullføre profilen.",
            "elementName": "account_creation_confirmation_3",
            "industry": "E_COMMERCE,FINANCIAL_SERVICES",
            "languageCode": "nb",
            "topic": "ACCOUNT_UPDATES",
            "usecase": "ACCOUNT_CREATION_CONFIRMATION"
        },
        {
            "category": "UTILITY",
            "containerMeta": "{\"data\":\"{{1}}, bestillingen din er levert! \\n\\nDu kan spore pakken din og administrere bestillingen nedenfor.\",\"buttons\":[{\"type\":\"URL\",\"text\":\"Administrer bestilling\",\"url\":\"https://www.example.com\"}],\"sampleText\":\"[John], bestillingen din er levert! \\n\\nDu kan spore pakken din og administrere bestillingen nedenfor.\",\"enableSample\":false,\"editTemplate\":false,\"allowTemplateCategoryChange\":false,\"addSecurityRecommendation\":false}",
            "data": "{{1}}, bestillingen din er levert! \n\nDu kan spore pakken din og administrere bestillingen nedenfor.",
            "elementName": "delivery_confirmation_1",
            "industry": "E_COMMERCE",
            "languageCode": "nb",
            "topic": "ORDER_MANAGEMENT",
            "usecase": "DELIVERY_CONFIRMATION"
        }
   ]  
}      

Status Codes

Status CodeResponseComments
Success
200{ "status": "success", "templates": \[ { "category": "UTILITY", "containerMeta": "{\"data\":\"Hei, {{1}}\\n\\nDen nye kontoen din er opprettet.\\n\\nBekreft {{2}} for å fullføre profilen.\",\"buttons\":[{\"type\":\"URL\",\"text\":\"Bekreft konto\",\"url\":\"https://www.example.com\"}],\"header\":\"Fullfør konfigurering av konto\",\"sampleText\":\"Hei, [John]\\n\\nDen nye kontoen din er opprettet.\\n\\nBekreft [e-postadressen din] for å fullføre profilen.\",\"sampleHeader\":\"Fullfør konfigurering av konto\",\"enableSample\":false,\"editTemplate\":false,\"allowTemplateCategoryChange\":false,\"addSecurityRecommendation\":false}", "data": "Hei, {{1}}\\n\\nDen nye kontoen din er opprettet.\\n\\nBekreft {{2}} for å fullføre profilen.", "elementName": "account_creation_confirmation_3", "industry": "E_COMMERCE,FINANCIAL_SERVICES", "languageCode": "nb", "topic": "ACCOUNT_UPDATES", "usecase": "ACCOUNT_CREATION_CONFIRMATION" }, { "category": "UTILITY", "containerMeta": "{\"data\":\"{{1}}, bestillingen din er levert! \\n\\nDu kan spore pakken din og administrere bestillingen nedenfor.\",\"buttons\":[{\"type\":\"URL\",\"text\":\"Administrer bestilling\",\"url\":\"https://www.example.com\"}],\"sampleText\":\"[John], bestillingen din er levert! \\n\\nDu kan spore pakken din og administrere bestillingen nedenfor.\",\"enableSample\":false,\"editTemplate\":false,\"allowTemplateCategoryChange\":false,\"addSecurityRecommendation\":false}", "data": "{{1}}, bestillingen din er levert! \\n\\nDu kan spore pakken din og administrere bestillingen nedenfor.", "elementName": "delivery_confirmation_1", "industry": "E_COMMERCE", "languageCode": "nb", "topic": "ORDER_MANAGEMENT", "usecase": "DELIVERY_CONFIRMATION" } ] }If templates are found for given filter(s)
200{ "status": "success", "templates": \[] }If no templates found for given filter(s)
Error
401{ "message": "Authentication Failed", "status": "error" }
429{ "status": "error", "message": "Too Many Requests" }10 Requests per Minute
500{ "status": "error", "message": "Internal Server Error" }PARTNER_APP_TOKEN
Language
Authorization
Bearer
JWT
Click Try It! to start a request and see the response here!