Skip to main content
GET
/
api
/
pub
/
wa
/
template
/
list
/
{whatsapp}
List WABA Templates
curl --request GET \
  --url https://app.adsera.in/api/pub/wa/template/list/{whatsapp} \
  --header 'x-api-key: <api-key>' \
  --header 'x-api-secret: <api-key>'
{
  "status": 200,
  "success": true,
  "error": "<unknown>",
  "templates": [
    {
      "_id": "60c72b2f9b1d8e001f8a1b2d",
      "company": "60c72b2f9b1d8e001f8a1b2a",
      "whatsapp": "60c72b2f9b1d8e001f8a1b2c",
      "templateId": "8794876541213",
      "wabaId": "123456789012345",
      "status": "APPROVED",
      "format": "NAMED",
      "category": "AUTHENTICATION",
      "name": "order_confirmation",
      "language": "en_US",
      "libraryTempName": "<string>",
      "components": [
        {
          "type": "HEADER",
          "format": "TEXT",
          "limited_time_offer": {
            "text": "<string>",
            "has_expiration": true
          },
          "text": "<string>",
          "add_security_recommendation": true,
          "code_expiration_minutes": 123,
          "example": {
            "header_handle": [
              "<string>"
            ],
            "header_text": [
              "<string>"
            ],
            "header_text_named_params": {},
            "body_text": [
              [
                "<string>"
              ]
            ],
            "body_text_named_params": {}
          },
          "buttons": [
            {
              "type": "QUICK_REPLY",
              "text": "<string>",
              "url": "<string>",
              "example": "<string>",
              "phoneNumber": "<string>",
              "flow_id": "<string>",
              "flow_action": "NAVIGATE",
              "flow_name": "<string>",
              "flow_json": {},
              "navigate_screen": "<string>",
              "icon": "DOCUMENT",
              "otp_type": "COPY_CODE",
              "supported_apps": [
                {
                  "package_name": "<string>",
                  "signature_hash": "<string>"
                }
              ]
            }
          ],
          "cards": [
            {
              "components": "<array>"
            }
          ]
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "totalCount": 25,
  "currentPage": 1,
  "perPage": 10
}

Authorizations

x-api-key
string
header
required

Your application's unique ID.

x-api-secret
string
header
required

Your application's secret key.

Path Parameters

whatsapp
string
required

The _id of the WABA account to fetch templates for.

Example:

"60c72b2f9b1d8e001f8a1b2c"

Query Parameters

Search query for template name.

page
integer
default:1

The page number for pagination.

perPage
integer
default:10

The number of items to return per page.

Response

A paginated list of templates.

status
integer
Example:

200

success
boolean
Example:

true

error
null
templates
object[]
totalCount
integer
Example:

25

currentPage
integer
Example:

1

perPage
integer
Example:

10