# WhatsApp error 132001: template does not exist — fix

URL: https://wa.genuka.com/en/docs/errors/132001
Language: English

> WhatsApp error 132001 (Template does not exist): no approved template in that language. The en vs en_US trap, and how to check name, language and status.

WhatsApp error 132001 means Meta cannot find an approved template with this name in this language,
on the WhatsApp Business account doing the sending. Most of the time it is the language code: `en`
and `en_US` are two different templates. Check the name, the exact language and the status, then
send again.

## What does error 132001 mean?

> "The template does not exist in the specified language or the template has not been approved."
> — [Meta, Cloud API error codes](https://developers.facebook.com/documentation/business-messaging/whatsapp/support/error-codes#other-errors)

Meta asks you to make sure the template has been approved, and that its name and language locale
are correct. The title that comes with the code in the `message` field is "Template does not
exist" ([360dialog's list](https://docs.360dialog.com/docs/support/api-error-message-list)).

Three Meta rules explain most cases:

* **A template is identified by its name and its language.** Creating the same name in several
  languages produces several templates, each counted separately
  ([Meta, Templates](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/overview)).
* **Language codes are exact.** `en`, `en_US` and `en_GB` are three distinct languages, as are
  `fr`, `fr_BE`, `fr_CA` and `fr_CH`
  ([Meta, Supported languages](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/supported-languages)).
* **A template belongs to a WhatsApp Business account.** It does not exist for a number attached
  to another account. A template inactive for 12 months or more is archived, then deleted 28 days
  later unless it is unarchived.

## When does error 132001 happen?

* **The language you send is not the template's**, for example `en_US` for a template created as
  `en`, or `fr_CA` for a template created as `fr`.
* **The language is left out on one side.** This is the trap specific to the Genuka WA API:
  without `language`, a template is **created** as `en`, but a message is **sent** as `en_US`. A
  template created and sent without a language therefore ends in 132001.
* **The template is not approved yet**, or was rejected.
* **The name differs**: a typo, a capital letter, a forgotten `_v2` suffix.
* **The number is on the wrong account**: a template created for one client, sent from another
  client's number.

### Where do you see it in Genuka WA?

Genuka WA keeps a mirror of the templates created through it, by API or from the dashboard. When
it knows the requested template in that language, it refuses the send itself if the template is
not approved, and names the reason. When it does not know it, for example a template created in
WhatsApp Manager, the request goes to Meta, which sends it or answers 132001.

| Situation                                      | `POST /api/v1/messages` response                                                                                                                                                                                    |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Template unknown to Genuka WA in that language | `400`, `"error": "send_template"`, `meta.code: 132001` (Meta's answer)                                                                                                                                              |
| Known template, under review                   | `400`, `"error": "send_template"`, `message`: `Template "x" is still under review by Meta`                                                                                                                          |
| Known template, rejected                       | `400`, `"error": "send_template"`, `message`: `Template "x" was rejected during review and cannot be sent`, followed by the reason                                                                                  |
| Known template, paused or disabled             | `400`, `"error": "send_template"`, `meta.code`: [132015](https://wa.genuka.com/en/docs/errors/132015) or 132016. That 132016 can also mean a template Meta only flagged (`FLAGGED`): read it again, see [132015](https://wa.genuka.com/en/docs/errors/132015) |

When creating a campaign, a template and a number that do not belong to the same client are
refused upfront with `400 template_connection_mismatch`.

## How do I fix error 132001?

1. **Re-read your templates** with `GET /api/v1/templates?sync=true`, filtered by `companyId` if
   needed: each row gives an up-to-date `name`, `language` and `status`. That list only holds the
   templates created through Genuka WA: the sync refreshes their status but does not import the ones
   created in WhatsApp Manager. For those, check name, language and status in WhatsApp Manager.
2. **Compare character by character** the name and language of the row you want with what your code
   sends.
3. **Act on the status**: `pending`, wait for the review; `rejected`, fix it and submit again;
   missing in that language, including in WhatsApp Manager, create the translation with
   `POST /api/v1/templates`, same name, new `language`.
4. **Send again, always passing `language`**, with exactly the value of the row you found.

**curl**

```bash
curl "https://wa.genuka.com/api/v1/templates?sync=true&companyId=cmp_1&status=approved" \
  -H "Authorization: Bearer $GENUKA_WA_API_KEY"
# { "data": [ { "id": "tpl_1", "name": "order_update", "language": "en", "status": "approved", ... } ] }
```

**Node.js**

```ts
/**
 * The exact language a template created through Genuka WA is approved in, or an explicit error.
 * A template created in WhatsApp Manager is not in this list.
 */
export async function approvedLanguage(companyId: string, name: string, wanted: string) {
  const url = new URL("https://wa.genuka.com/api/v1/templates");
  url.search = new URLSearchParams({ sync: "true", companyId, status: "approved" }).toString();

  const response = await fetch(url, {
    headers: { Authorization: `Bearer ${process.env.GENUKA_WA_API_KEY}` },
  });
  const { data } = (await response.json()) as { data: { name: string; language: string }[] };

  const languages = data.filter((t) => t.name === name).map((t) => t.language);
  if (languages.includes(wanted)) return wanted;
  throw new Error(
    languages.length === 0
      ? `"${name}" not found among the approved templates in Genuka WA (check WhatsApp Manager)`
      : `"${name}" is approved in ${languages.join(", ")}, not in ${wanted}`,
  );
}
```

**Python**

```python
import os
import requests


def approved_language(company_id: str, name: str, wanted: str) -> str:
    """The exact language a template created through Genuka WA is approved in.

    A template created in WhatsApp Manager is not in this list.
    """
    response = requests.get(
        "https://wa.genuka.com/api/v1/templates",
        params={"sync": "true", "companyId": company_id, "status": "approved"},
        headers={
            "Authorization": f"Bearer {os.environ['GENUKA_WA_API_KEY']}",
            "User-Agent": "acme-crm/1.0 (+https://example.com)",
        },
        timeout=60,
    )
    response.raise_for_status()
    languages = [t["language"] for t in response.json()["data"] if t["name"] == name]
    if wanted in languages:
        return wanted
    if not languages:
        raise LookupError(f'"{name}" not found among the approved templates in Genuka WA (check WhatsApp Manager)')
    raise LookupError(f'"{name}" is approved in {", ".join(languages)}, not in {wanted}')
```

**PHP**

```php
<?php
$query = http_build_query(["sync" => "true", "companyId" => "cmp_1", "status" => "approved"]);
$ch = curl_init("https://wa.genuka.com/api/v1/templates?{$query}");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERAGENT => "acme-crm/1.0 (+https://example.com)",
    CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("GENUKA_WA_API_KEY")],
]);
$templates = json_decode(curl_exec($ch), true)["data"];
curl_close($ch);

foreach ($templates as $template) {
    echo "{$template['name']} [{$template['language']}] {$template['status']}\n";
}
```

## How do I prevent error 132001?

* **Store the name + language pair**, never the name alone, in your configuration.
* **Always send `language`**, even when you think the default will do: it is not the same at
  creation (`en`) and at send time (`en_US`).
* **Create every language you need**: a send in `fr_BE` fails if only the `fr` template exists.
  The simplest approach is often a single code per language, `fr` or `en`.
* **Listen to the `message_template_status_update` webhook** and only use a new template once it
  is approved; `GET /api/v1/templates?sync=true` repairs a status that fell behind.

## Related error codes

* [132000](https://wa.genuka.com/en/docs/errors/132000): the template is found, but the number of variables does not
  match.
* [132015](https://wa.genuka.com/en/docs/errors/132015): the template exists and was approved, but it is paused.
* [131047](https://wa.genuka.com/en/docs/errors/131047): the 24-hour window is closed, the usual reason for switching
  to a template.

## FAQ

### My template is approved in WhatsApp Manager, so why 132001?

Three suspects, in this order: the language code you send is not exactly the template's, the
sending number belongs to another WhatsApp Business account, or the name differs by one
character.

### Are `en` and `en_US` the same language for Meta?

No. They are two distinct codes in Meta's list, so two distinct templates. A template created as
`en` does not answer a send in `en_US`.

### Can a template disappear without me deleting it?

Yes. Meta archives a template that has been inactive for 12 months or more, then deletes it 28
days later unless it is unarchived. A rarely used re-engagement template is the typical candidate.

## Sources

* [Meta — Error codes](https://developers.facebook.com/documentation/business-messaging/whatsapp/support/error-codes)
* [Meta — Templates overview](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/overview)
* [Meta — Supported languages](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/supported-languages)
* [360dialog — API error message list](https://docs.360dialog.com/docs/support/api-error-message-list)
