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

# Get WhatsApp template

> Get one WhatsApp template's content and retry settings by ID.

```json 200 theme={null}
{
  "template": {
    "id": "22222222-2222-4222-8222-222222222222",
    "channel_id": "5f3c1e9a-8b2d-4c1e-9f6a-0d1b2c3d4e5f",
    "name": "order_update",
    "language": "en",
    "category": "UTILITY",
    "status": "APPROVED",
    "type": "TEMPLATE",
    "components": [
      { "type": "HEADER", "format": "IMAGE", "example": { "header_handle": ["https://cdn.example.com/banner.jpg"] } },
      { "type": "BODY", "text": "Hi {{1}}, your order {{2}} is on its way." },
      { "type": "FOOTER", "text": "Reply STOP to opt out." },
      { "type": "BUTTONS", "buttons": [{ "type": "URL", "text": "Track order", "url": "https://example.com/track/{{1}}" }] }
    ],
    "parameters": {
      "header_parameter": { "type": "value", "value": "https://cdn.example.com/banner.jpg" },
      "body_parameters": [
        { "type": "variable", "variable": "sagepilot.customer.name" },
        { "type": "variable", "variable": "shopify.order.name" }
      ],
      "button_parameters": [
        { "type": "variable", "variable": "shopify.order.tracking_url" }
      ]
    },
    "wa_retry_config": {
      "retry_timeout_hours": 12,
      "retry_window_enabled": true,
      "retry_window_start_hour": 21,
      "retry_window_end_hour": 7,
      "retry_window_timezone": "Asia/Kolkata"
    }
  }
}
```

```json 404 theme={null}
{
  "detail": "Template not found"
}
```

Get one WhatsApp template in the authenticated workspace. The response is the template's renderable definition plus its retry settings. Channel credentials, provider responses, and editor state are never returned.

## Required access

| Authentication | Scope | Dataset grant |
| - | - | - |
| [API client v2](https://docs.sagepilot.ai/api-reference/authentication/api-client-v2.md) | `templates:read` | - |

## Path parameters

**template\_id** `string` *required*

Template UUID. Take `id` from a [List WhatsApp templates](https://docs.sagepilot.ai/api-reference/templates/list-whatsapp-templates.md) response.

## Response

**template** `object` *required*

The template definition.

**template.id** `string`

Template UUID.

**template.channel\_id** `string`

WhatsApp channel the template belongs to, when present.

**template.name** `string`

Template name as registered with Meta. Names are case-sensitive and are what you pass as `template_name` when sending.

**template.language** `string`

Meta language code, for example `en` or `en_US`.

**template.category** `string`

Meta category: `MARKETING`, `UTILITY`, or `AUTHENTICATION`.

**template.status** `string`

Meta review status, for example `APPROVED`, `PENDING`, `REJECTED`, or `DRAFT` for templates not yet submitted.

**template.type** `string`

`TEMPLATE` for a standard template or `CAROUSEL` for a carousel template.

**template.components** `object[]`

Meta-style components: `HEADER`, `BODY`, `FOOTER`, `BUTTONS`, and for carousels `CAROUSEL` with `cards`. Placeholders appear as `{{1}}`, `{{2}}`, and so on.

**template.parameters** `object`

How Sagepilot fills each placeholder. Keys are `header_parameter`, `body_parameters`, `button_parameters`, and for carousels `cards`. Each mapping is either `{"type": "variable", "variable": "<source.name>"}` for a catalog variable or `{"type": "value", "value": "..."}` for a fixed value.

**template.wa\_retry\_config** `object`

Retry behaviour for campaign and journey sends that use this template.

* **Platform default**: `null`. Failed sends are retried for up to 120 hours.
* **Customized**: an object with `retry_timeout_hours` (`1` to `120`) and, when `retry_window_enabled` is `true`, `retry_window_start_hour` and `retry_window_end_hour` (`0` to `23`, the end may be earlier than the start for an overnight window) plus `retry_window_timezone` (IANA name such as `Asia/Kolkata`).
* **Retries off**: `{"retry_disabled": true}`. Failed sends are left failed.

## Errors

| Status | Meaning |
| - | - |
| `401` | Missing or invalid API client token. |
| `403` | The API client lacks the `templates:read` scope. |
| `404` | No template with this ID exists in the workspace. |
| `422` | `template_id` is not a valid UUID. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.