> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zixflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get WhatsApp Templates

> Retrieves a list of WhatsApp templates for a specific phone ID

#### Description

This endpoint allows you to retrieve a paginated list of all WhatsApp templates available for a specific Phone ID. Templates can be filtered by status and include details such as name, category, language, and status.

#### Headers

<ParamField header="x-api-key" type="string" required placeholder="Enter your API key">
  Your API key for authentication.
</ParamField>

<ParamField header="x-workspace-id" type="string" required placeholder="Enter your workspace ID">
  Your workspace ID for authentication.
</ParamField>

#### Path Parameters

<ParamField path="phone_id" type="string" required placeholder="Enter WhatsApp Phone ID">
  The unique Phone ID associated with your WhatsApp Business account. You can find this on the Zixflow WhatsApp Settings page or by calling the Get WhatsApp Accounts endpoint.
</ParamField>

#### Query Parameters

<ParamField query="limit" type="integer" placeholder="Enter limit (default: 10)">
  The maximum number of templates to return in the response. Default is 10.
</ParamField>

<ParamField query="offset" type="integer" placeholder="Enter offset (default: 0)">
  The number of templates to skip before starting to return results. Used for pagination. Default is 0.
</ParamField>

#### Response

<ResponseField name="success" type="boolean">
  Indicates whether the API call was successful.
</ResponseField>

<ResponseField name="message" type="string">
  Success or error message from the API.
</ResponseField>

<ResponseField name="data" type="object">
  The template list response containing:
</ResponseField>

<ResponseField name="data.data" type="array">
  An array of WhatsApp template objects, each containing:
</ResponseField>

<ResponseField name="data.data[].name" type="string">
  The name of the WhatsApp template.
</ResponseField>

<ResponseField name="data.data[].language" type="string">
  The language code of the template (e.g., "en", "en\_US").
</ResponseField>

<ResponseField name="data.data[].category" type="string">
  The category of the template. Possible values: "MARKETING", "UTILITY", "AUTHENTICATION".
</ResponseField>

<ResponseField name="data.data[].status" type="string">
  The approval status of the template. Possible values: "APPROVED", "PENDING", "REJECTED".
</ResponseField>

<ResponseField name="data.data[].components" type="array">
  An array of template components that define the structure of the template.
</ResponseField>

<ResponseField name="data.pagination" type="object">
  Pagination information containing:
</ResponseField>

<ResponseField name="data.pagination.size" type="integer">
  The total number of templates available.
</ResponseField>

<ResponseField name="data.pagination.count" type="integer">
  The number of templates returned in this response.
</ResponseField>

<ResponseField name="data.pagination.pageSize" type="integer">
  The page size used for this request.
</ResponseField>

<ResponseExample>
  ```json 200-Success theme={null}
  {
    "success": true,
    "message": "Templates retrieved successfully",
    "data": {
      "data": [
        {
          "name": "welcome_message",
          "language": "en",
          "category": "UTILITY",
          "status": "APPROVED",
          "components": []
        },
        {
          "name": "order_confirmation",
          "language": "en_US",
          "category": "MARKETING",
          "status": "APPROVED",
          "components": []
        }
      ],
      "pagination": {
        "size": 25,
        "count": 10,
        "pageSize": 10
      }
    }
  }
  ```

  ```json 400-Bad Request theme={null}
  {
    "success": false,
    "message": "Invalid phone_id parameter"
  }
  ```

  ```json 401-Unauthorized theme={null}
  {
    "success": false,
    "message": "Unauthorized. Please check your API key and workspace ID."
  }
  ```

  ```json 500-Internal Server Error theme={null}
  {
    "success": false,
    "message": "Internal server error. Please try again later."
  }
  ```
</ResponseExample>
