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

# Get Template Detail

> Retrieve the details of a single WhatsApp message template by its Meta source ID.

## What it does

Returns the current detail of a single template (by Meta `sourceId`). Data is read fresh directly from Meta (no caching); the `app_id` is verified to belong to the organization. With `expand=components`, the body/header/button details are included too.

***

## Endpoint

```text theme={null}
GET /public/api/v1/wa/{app_id}/templates/{source_id}
```

### Headers

<ParamField header="Authorization" type="string" required>
  Secret key in `Bearer sk_...` format. See [Secret Key authentication](/essentials/authentication#secret-key).
</ParamField>

### Path parameters

<ParamField path="app_id" type="string" required>
  Application ID. Must belong to the organization.
</ParamField>

<ParamField path="source_id" type="string" required>
  The template's Meta ID.
</ParamField>

### Query parameters

<ParamField query="expand" type="string[]">
  `components` → also returns the components. Default: metadata only.
</ParamField>

***

## Response

Type: `Result[TemplateResponseModel]` (single). The envelope is `{ "data": { ... }, "isSuccess": true }`.

<ResponseField name="isSuccess" type="boolean">
  `true` when the request completed successfully.
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="data">
    <ResponseField name="sourceId" type="string">
      The template's Meta ID.
    </ResponseField>

    <ResponseField name="name" type="string">
      Template name.
    </ResponseField>

    <ResponseField name="language" type="string">
      Language code.
    </ResponseField>

    <ResponseField name="category" type="string">
      See [Template Category](/public-api-reference/template/reference/enums#template-category).
    </ResponseField>

    <ResponseField name="status" type="string">
      See [Template Status](/public-api-reference/template/reference/enums#template-status).
    </ResponseField>

    <ResponseField name="components" type="object[]">
      Component details. Returned only with `expand=components`. Each component has a `type` (`HEADER` / `BODY` / `FOOTER` / `BUTTONS`) and the fields relevant to that type and category.
    </ResponseField>

    <ResponseField name="qualityScore" type="string">
      See [Template Quality Score](/public-api-reference/template/reference/enums#template-quality-score).
    </ResponseField>

    <ResponseField name="rejectedReason" type="string">
      Rejection reason (`NONE` / `ABUSIVE_CONTENT` / `INVALID_FORMAT`…).
    </ResponseField>

    <ResponseField name="parameterFormat" type="string">
      See [Template Parameter Format](/public-api-reference/template/reference/enums#template-parameter-format).
    </ResponseField>
  </Expandable>
</ResponseField>

<Note>
  Null fields (`id`, `createdAt`, `messageSendTtlSeconds`, `correctCategory`, `previousCategory`) are dropped from the response. Phone buttons are returned from Meta in RFC3966 format (`tel:+90-555-123-45-67`).
</Note>

***

## Examples

<AccordionGroup>
  <Accordion title="Demo 1 — detail (default, without components)">
    ```text theme={null}
    GET /public/api/v1/wa/{app_id}/templates/842802041844912
    Authorization: Bearer sk_...
    ```

    ```json theme={null}
    {
      "data": {
        "sourceId": "842802041844912",
        "name": "order_confirmation",
        "language": "en",
        "category": "UTILITY",
        "status": "APPROVED",
        "qualityScore": "GREEN",
        "rejectedReason": "NONE",
        "parameterFormat": "POSITIONAL"
      },
      "isSuccess": true
    }
    ```
  </Accordion>

  <Accordion title="Demo 2 — detail + components (expand=components)">
    ```text theme={null}
    GET /public/api/v1/wa/{app_id}/templates/842802041844912?expand=components
    Authorization: Bearer sk_...
    ```

    ```json theme={null}
    {
      "data": {
        "sourceId": "842802041844912",
        "name": "order_confirmation",
        "language": "en",
        "category": "UTILITY",
        "status": "APPROVED",
        "components": [
          { "type": "HEADER", "format": "TEXT", "text": "Order #{{1}} confirmed", "example": { "headerText": ["12345"] } },
          { "type": "BODY", "text": "Hello {{1}}, your order {{2}} has been confirmed.", "example": { "bodyText": [["John", "#12345"]] } },
          { "type": "FOOTER", "text": "Sent via Connexease" },
          { "type": "BUTTONS", "buttons": [
            { "type": "URL", "text": "Track Order", "url": "https://example.com/track/{{1}}", "example": ["https://example.com/track/abc123"] },
            { "type": "PHONE_NUMBER", "text": "Call Us", "phoneNumber": "tel:+90-555-123-45-67" }
          ]}
        ],
        "qualityScore": "GREEN",
        "rejectedReason": "NONE",
        "parameterFormat": "POSITIONAL"
      },
      "isSuccess": true
    }
    ```
  </Accordion>

  <Accordion title="Demo 3 — rejected template (rejectedReason populated)">
    ```text theme={null}
    GET /public/api/v1/wa/{app_id}/templates/1234567890?expand=components
    Authorization: Bearer sk_...
    ```

    ```json theme={null}
    {
      "data": {
        "sourceId": "1234567890",
        "name": "promo_blast",
        "language": "en",
        "category": "MARKETING",
        "status": "REJECTED",
        "components": [
          { "type": "BODY", "text": "Win big now {{1}}!!! Click fast!!!", "example": { "bodyText": [["John"]] } }
        ],
        "qualityScore": "UNKNOWN",
        "rejectedReason": "ABUSIVE_CONTENT",
        "parameterFormat": "POSITIONAL"
      },
      "isSuccess": true
    }
    ```
  </Accordion>

  <Accordion title="Demo 4 — AUTHENTICATION template detail">
    ```text theme={null}
    GET /public/api/v1/wa/{app_id}/templates/9988776655?expand=components
    Authorization: Bearer sk_...
    ```

    ```json theme={null}
    {
      "data": {
        "sourceId": "9988776655",
        "name": "login_otp",
        "language": "en",
        "category": "AUTHENTICATION",
        "status": "APPROVED",
        "components": [
          { "type": "BODY", "addSecurityRecommendation": true },
          { "type": "FOOTER", "codeExpirationMinutes": 10 },
          { "type": "BUTTONS", "buttons": [ { "type": "OTP", "otpType": "COPY_CODE", "text": "Copy code" } ] }
        ],
        "qualityScore": "UNKNOWN",
        "rejectedReason": "NONE",
        "parameterFormat": "POSITIONAL"
      },
      "isSuccess": true
    }
    ```
  </Accordion>

  <Accordion title="Demo 5 — not found (invalid source_id) → 404">
    ```text theme={null}
    GET /public/api/v1/wa/{app_id}/templates/0000000000
    Authorization: Bearer sk_...
    ```

    ```json theme={null}
    {
      "errors": {
        "code": "META_075",
        "group": "NOT_FOUND",
        "description": "Template with 0000000000 not found in Meta."
      },
      "isSuccess": false
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Errors

<ResponseField name="errors" type="object">
  Error details with `code`, `group`, and `description`; `isSuccess` is `false`.
</ResponseField>

### Auth / tenant

| HTTP | Code                      | When                                          |
| ---- | ------------------------- | --------------------------------------------- |
| 401  | `ORGANIZATION_SECRET_010` | Secret key is missing.                        |
| 401  | `ORGANIZATION_SECRET_011` | Secret key is invalid.                        |
| 404  | `APPLICATION_004`         | `app_id` does not belong to the organization. |

### Request validation (422)

| HTTP | When                                                       |
| ---- | ---------------------------------------------------------- |
| 422  | Invalid `expand` value (anything other than `components`). |

### Meta-side

| HTTP | Code       | When                                                             |
| ---- | ---------- | ---------------------------------------------------------------- |
| 404  | `META_075` | `source_id` not found (Meta `code=100` is treated as not found). |
| 401  | `META_034` | Token invalid/expired (190).                                     |
| 403  | `META_035` | Permission denied (10 / 200–299).                                |
| 429  | `META_036` | Rate limit (4 / 80007).                                          |
| 502  | `META_004` | General/fallback fetch error.                                    |
