# Get a template

Retrieves a specific template by its ID and language.

Endpoint: GET /api/template/{templateId}
Version: 2.1.0.0
Security: basicAuth, ApiKeyAuth

## Security:

  - `basicAuth` (unknown)
    http basic

  - `ApiKeyAuth` (unknown)
    apiKey in header X-Api-Key

## Path parameters:

  - `templateId` (integer, required)
    Unique identifier of the template.

## Query parameters:

  - `language` (string, required)
    Language code of the template (e.g. `it`, `en`).

## Response 200:

  - `200` (unknown)
    Template retrieved successfully.

## Response 200 fields (application/json):

  - `name` (string | null)
    Template name.

  - `description` (string | null)
    Template description.

  - `language` (string | null)
    Language code of the template (e.g. `it`, `en`). See [supported languages](https://developers.facebook.com/docs/whatsapp/api/messages/message-templates#supported-languages) for the full list of valid values.
    Example: it

  - `category` (string | null)
    WhatsApp template category.
    Enum: "UTILITY", "MARKETING", "AUTHENTICATION"

  - `status` (string | null)
    Template approval status (e.g. `APPROVED`, `PENDING`, `REJECTED`).

  - `templateId` (string | null)
    Unique identifier of the template.

  - `default` (boolean | null)
    Whether this is the default language variant for the template.

  - `body` (object)
    Template body component.

  - `body.text` (string | null)
    Static body text.

  - `body.parameters` (array | null)
    List of dynamic text parameters to substitute in the template body.

  - `body.parameters.text` (string | null)
    Parameter value to substitute in the template.

  - `textHeader` (object)
    Template text header component.

  - `textHeader.text` (string | null)
    Header text.

  - `footer` (object)
    Template footer component.

  - `footer.text` (string | null)
    Footer text.

  - `footer.codeExpirationMinutes` (integer | null)
    OTP code expiration time in minutes.

  - `urlButtons` (array | null)
    List of URL button components.

  - `urlButtons.index` (integer | null)
    Zero-based index of the URL button in the template.

  - `urlButtons.urlPath` (string | null)
    Dynamic path suffix appended to the button's base URL.

  - `urlButtons.url` (string | null)
    Full URL override for the button.

  - `urlButtons.text` (string | null)
    Button label text.

## Response 401:

  - `401` (unknown)
    Authentication failed — invalid or missing credentials.

## Response 403:

  - `403` (unknown)
    Forbidden — the account does not have the required role.

## Response 403 fields (application/json):

  - `type` (string)
    Exception type identifier.

  - `code` (integer)
    Numeric error code. See [Error codes](https://docs.namirial.app/products/whatsapp/) for the full list.

  - `message` (string)
    Human-readable error description.

  - `errorDetails` (array | null)
    Additional validation error details, present on constraint violations.

  - `errorDetails.field` (string)
    The field that failed validation.

  - `errorDetails.message` (string)
    Validation error message.

## Response 404:

  - `404` (unknown)
    Template not found.

## Response 200 examples:

  - `Utility template` (unknown)

  - `Authentication template` (unknown)

## Response 401 examples:

  - `Invalid credentials` (unknown)

  - `Missing API key` (unknown)

  - `Invalid API key` (unknown)

## Response 403 examples:

  - `Insufficient role` (unknown)

