Skip to content

GetTemplates#

The method is intended to get the list of all created templates for your instance.

Request#

To to get the list of all created templates for your instance you need to execute a request to:

GET {{apiUrl}}/waInstance{{idInstance}}/getTemplates/{{apiTokenInstance}}
For idInstance, apiTokenInstance and apiUrl request parameters, refer to Before you start section.

Response#

Response parameters#

Parameter Type Description
templates array An array of objects of all existing templates

Response body example#

Status code success: 200 OK.

{
  "templates": [
    {
      "appId": "3cb92fbd-0bac-41d7-818e-4e4326d90335",
      "buttonSupported": "PN,URL",
      "category": "MARKETING",
      "containerMeta": "{\"data\":\"Exclusive deals on car and train bookings. Book now..!! flejpaiqah9z\",\"buttons\":[{\"type\":\"PHONE_NUMBER\",\"text\":\"Contact\",\"phone_number\":\"+919139472766\"},{\"type\":\"URL\",\"text\":\"Greenwaba\",\"url\":\"https://www.google.com/\"}],\"header\":\"Dear {{1}}\",\"footer\":\"Thank you\",\"sampleText\":\"Exclusive deals on car and train bookings. Book now..!! flejpaiqah9z\",\"sampleHeader\":\"Dear [user]\",\"enableSample\":true,\"editTemplate\":false,\"allowTemplateCategoryChange\":false,\"addSecurityRecommendation\":false,\"correctCategory\":\"UTILITY\"}",
      "createdOn": 1717510871793,
      "data": "Dear {{1}}\nExclusive deals on car and train bookings. Book now..!! flejpaiqah9z\nThank you | [Contact,+919139472766] | [Greenwaba,https://www.google.com/]",
      "elementName": "qa_automation_qa_automation_112907flejpaiqah9z",
      "externalId": "<metaTemplateId>",
      "id": "51eddb1e-8e36-44df-a9e5-2815e4f8463b",
      "internalCategory": 0,
      "internalType": 0,
      "languageCode": "en",
      "languagePolicy": "deterministic",
      "meta": "{\"example\":\"Exclusive deals on car and train bookings. Book now..!! flejpaiqah9z\"}",
      "modifiedOn": 1717511304250,
      "namespace": "<namespace>",
      "oldCategory": "UTILITY",
      "priority": 1,
      "quality": "UNKNOWN",
      "retry": 0,
      "stage": "NONE",
      "status": "APPROVED",
      "templateType": "TEXT",
      "wabaId": "106579118720596"
    }
  ]
}

GetTemplates errors#

For a list of errors common to all methods, refer to Common errors section.

Request examples#

curl --location '{{apiUrl}}/waInstance{{idInstance}}/getTemplates/{{apiTokenInstance}}'