Get WABA Templates

Returns paginated WABA templates for your companies

GEThttps://api.pact.im/api/p2/waba_templates

Returns paginated WABA templates for the user's companies.

Sorted by created_at: desc by default. You can override sorting with the sort parameter and filter by companies with company_ids.

By default, 25 templates are returned per page.

Read more about pagination.

Query Parameters

ParameterRequiredValidationsDescription
private_api_tokentrueMust be a stringYOUR_API_TOKEN
company_idsfalseMust be an array of integersCompany IDs. Returns templates for all companies if omitted
sortfalseMust be an objectSort by created_at or position, ascending or descending. Example: {"position": "asc"}. Defaults to created_at: desc
pagefalseMust be an integerPage number. Returns the first page if omitted
per_pagefalseMust be an integerEntries per page (25 by default)

Example

Request

shell
curl -X GET 'https://api.pact.im/api/p2/waba_templates' \
  --header 'Content-Type: application/json' \
  --data '{
    "private_api_token": YOUR_API_TOKEN,
    "company_ids": [<COMPANY_ID>],
    "sort": {"position": "asc"},
    "per_page": 50
  }'

Response

json
{
  "waba_templates": [
    {
      "id": 1,
      "name": "fuga",
      "body": "Temporibus et rerum optio.",
      "waba_id": "cjw8av3d2l",
      "substitutions_count": 0,
      "header_content_type": null,
      "company_id": 52204,
      "header": null,
      "namespace": null,
      "created_at": "2025-05-21T00:29:29.313Z",
      "position": 1
    },
    {
      "id": 2,
      "name": "with_params",
      "body": "Привет, {{1}}. Это тест параметров. {{2}} - тест второго параметра.",
      "waba_id": "with_params",
      "substitutions_count": 2,
      "header_content_type": null,
      "company_id": 52204,
      "header": null,
      "namespace": "ab06e962_230a_4e22_a3e2_a17bb8951856",
      "created_at": "2025-05-21T02:13:08.232Z",
      "position": 2
    }
  ],
  "meta": {
    "page": 1,
    "entries_count": 2,
    "per_page": 25
  }
}

Search…

Start typing to search