---
docId: doc_4edfadc333254a6796bf9f8e4eb548d0
title: Get a template
description: "Read a template by name and choose its language version."
api:
  group: mensajes/plantillas
  auth: bearer
  operations:
    - operationId: getWhatsAppTemplate
      method: GET
      path: '/v1/whatsapp/templates/{name}'
      postmanName: Get a Template
---

<script>
  import { Ways, Note, Collapsible } from '$lib/components';
</script>

# Get a template

Read a template by name. Use `language` to choose its language; the response includes one version and the available languages.

Meta stores one version per name and language: `order_update` in `es_MX` and in `en_US` are two versions. You need an approved template to start a conversation outside the 24-hour window.

<Note type="important">

You can [create](/api-reference/whatsapp-templates/create), [update](/api-reference/whatsapp-templates/update) and [delete](/api-reference/whatsapp-templates/delete) templates with the API. Meta reviews each new or edited template before it can be sent.

</Note>

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/whatsapp/templates/$TEMPLATE_NAME \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
const template = await platic.whatsapp.templates.get("order_update");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `name` | string | Exact name of the template to get | ✓ |

## Query parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `workspace` | string | ID of the workspace to look in. Required if your credential covers several workspaces ([list workspaces](/api-reference/workspaces)); without it the answer is `400`. Its former name, `workspaceId`, is also accepted | If the credential has several |
| `language` | string | The language version, such as `es_MX`. `es-MX` and `es_mx` are read the same | — |
| `wabaId` | string | The WhatsApp Business account (WABA) to look in. Only needed if the same name exists in several | — |

### Which version answers

- With `language`, the version in that language. If it does not exist, the response is `404 TEMPLATE_NOT_FOUND` with available languages in `details.languages`.
- Without `language` and with a single version, that one.
- Without `language` and with several, an approved one (`APPROVED`) before the others and, among equals, the lowest language code (`en_US` before `es` before `es_MX`). The same query always answers the same version.

[Send a template](/api-reference/messages/send-template) and [campaigns](/api-reference/campaigns) pick the version with the same rule.

## Response

`data` is the template, in the chosen version.

```json
{
  "status": "success",
  "data": {
    "name": "car_maintenance_reminder",
    "category": "UTILITY",
    "status": "APPROVED",
    "language": "es",
    "createdAt": "2025-07-20T10:12:34.567890123Z",
    "updatedAt": "2025-07-28T16:45:01.234567890Z",
    "content": "Hi {{1}}! A reminder of your maintenance appointment.",
    "header": "Maintenance reminder",
    "footer": "Reply CHANGE to reschedule",
    "buttons": [
      {
        "type": "URL",
        "text": "See location",
        "url": "https://example.com/shop/location"
      }
    ],
    "params": ["Ana", "2025-08-18"],
    "api_example": {
      "name": "car_maintenance_reminder",
      "params": ["Ana", "2025-08-18"]
    },
    "dynamicButtonsCount": 0,
    "wabaId": "155512345678901",
    "languages": ["en_US", "es"],
    "workspaceId": "K7u9rQ2LmZx18BvC5tNd"
  }
}
```

<Collapsible summary="Template fields">

| Field | Description |
|-------|-------------|
| `name` | Unique name of the template |
| `category` | Category: `UTILITY`, `MARKETING`, `AUTHENTICATION` |
| `status` | Status at Meta: `APPROVED`, `PENDING`, `REJECTED`, `PAUSED` or `DISABLED`. Only an `APPROVED` one can be sent |
| `language` | Language code (e.g. `es`, `en`) |
| `content` | Message body with variables `{{1}}`, `{{2}}`, etc. |
| `header` | Message header (optional) |
| `footer` | Message footer (optional) |
| `buttons` | Array of interactive buttons |
| `params` | Example values for the variables |
| `api_example` | Example of use in the API |
| `dynamicButtonsCount` | How many buttons need a value when sending |
| `wabaId` | The WABA of this version |
| `languages` | All the languages the template has in that WABA. Ask for another with `?language=` |
| `workspaceId` | The workspace where the template is |
| `templateNamespace` | Only on MessageBird (legacy) workspaces: the namespace its templates are sent with |

</Collapsible>

<Note type="tip">

Use the `api_example` field as a reference to build your requests to the `/v1/messages/template` endpoint.

</Note>

## Errors

<Collapsible summary="Show error codes and fixes">

| Status | `details.code` | When |
|--------|----------------|------|
| `400` | `INVALID_REQUEST` | `language` or `wabaId` are not valid (`details.issues` says which). Also if your credential covers several workspaces and you did not send `?workspace=`, if you sent one it does not cover (`details.available` has the IDs you can use), or if `workspace` and `workspaceId` name different workspaces |
| `401` | `UNAUTHENTICATED` | The credential is missing or not valid |
| `403` | `FORBIDDEN` | The person has no permission in Conversations or Campaigns. The message is `Missing conversations or campaigns permission` |
| `404` | `WORKSPACE_NOT_FOUND` | The workspace no longer exists |
| `404` | `WABA_NOT_FOUND` | The workspace has no connected WABA, or `wabaId` is not one of its WABAs. `details.requested` has the one you asked for and `details.available` the ones it has |
| `404` | `TEMPLATE_NOT_FOUND` | No template has that name, or it does not have that language. In the second case `details.language` has the one you asked for and `details.languages` the ones it has |
| `409` | `WHATSAPP_TOKEN_INVALID`, `WHATSAPP_PERMISSION_DENIED`, `WHATSAPP_ACCOUNT_RESTRICTED` | The template did not show up and a WABA of the workspace could not be read through its WhatsApp account. `details.wabaErrors` lists the ones that failed |
| `429` | `RATE_LIMITED` | Same, because WhatsApp is rate limiting requests for that WABA |
| `502` | `UPSTREAM_ERROR` | Same, because Platica could not reach WhatsApp |
| `503` | `TEMPORARILY_UNAVAILABLE` | Platica could not read the workspace or its WABAs. Try again in a moment |

A template found in one WABA is returned even if another WABA could not be read.

```json
{
  "code": 404,
  "error": "Not Found - The resource doesn't exist",
  "details": {
    "code": "TEMPLATE_NOT_FOUND",
    "message": "Template \"car_maintenance_reminder\" has no \"pt_BR\" version.",
    "language": "pt_BR",
    "languages": ["en_US", "es"]
  }
}
```

The general error format is in [Errors](/api-reference/errors).

</Collapsible>
