# List WhatsApp templates

URL: https://docs.dixa.io/openapi/dixa-api/beta/whatsapp-templates/getwhatsapptemplates

List WhatsApp templates for the organization, newest first. To find out a template's approval status and category, use the get template endpoint.

## GET /beta/whatsapp/templates

- Server: https://dev.dixa.io
- Auth: `Authorization: <API token>` header

### Request example

```bash
curl -X GET 'https://dev.dixa.io/beta/whatsapp/templates' \
  -H 'Authorization: <API token>'
```

### Response examples

#### 200 The list of WhatsApp templates

```json
{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "order_confirmation",
      "language": "en",
      "createdAt": "2026-01-01T00:00:00Z"
    },
    {
      "id": "517eedd9-bf71-4a84-bd95-2dd21360de3f",
      "name": "delivery_info",
      "language": "en",
      "createdAt": "2026-01-01T00:00:00Z"
    }
  ],
  "meta": {
    "next": "/beta/whatsapp/templates?pageKey=a2V5c2V0UGFnZUtleT1iMlptYzJWMFBUVXcmcGFnZUxpbWl0PTUwJmRpcj1mb3J3YXJk"
  }
}
```

#### 400

```json
{
  "message": "Decoding failure in request"
}
```

#### 500 Internal failure during request processing

```json
{
  "message": "There was an internal server error while processing the request"
}
```

## OpenAPI definition

The operation and the schemas used, from the full spec at https://docs.dixa.io/openapi-specs/dixa-beta.yaml. Request and response examples are above.

```yaml
openapi: 3.0.3
info:
  title: Dixa API
  version: beta
servers:
  - url: https://dev.dixa.io
security:
  - ApiKeyAuth: []
paths:
  /beta/whatsapp/templates:
    get:
      tags:
        - WhatsApp Templates
      summary: List WhatsApp templates
      description: List WhatsApp templates for the organization, newest first. To find
        out a template's approval status and category, use the get template
        endpoint.
      operationId: getWhatsappTemplates
      parameters:
        - name: pageLimit
          in: query
          description: Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      responses:
        "200":
          description: The list of WhatsApp templates
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListWhatsappTemplatesOutput"
        "400":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BadRequest"
        "500":
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ServerError"
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
  schemas:
    ListWhatsappTemplatesOutput:
      title: ListWhatsappTemplatesOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: "#/components/schemas/WhatsappTemplateListItem"
        meta:
          $ref: "#/components/schemas/PaginationLinks"
    WhatsappTemplateListItem:
      title: WhatsappTemplateListItem
      type: object
      required:
        - id
        - name
        - language
        - createdAt
      properties:
        id:
          type: string
        name:
          type: string
        language:
          type: string
        createdAt:
          type: string
    PaginationLinks:
      title: PaginationLinks
      type: object
      properties:
        previous:
          description: url
          type: string
        next:
          description: url
          type: string
    BadRequest:
      title: BadRequest
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ServerError:
      title: ServerError
      type: object
      required:
        - message
      properties:
        message:
          type: string
```
