> ## 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

> Returns the current detail of a single template by its Meta `sourceId`. Read fresh directly from Meta, with no caching.

With `expand=components` the header, body, footer, button, carousel, and limited-time offer detail is included as well.

Note that component buttons come back in snake_case (`phone_number`, `otp_type`, `package_name`) — different from the camelCase keys you send when creating a template.



## OpenAPI

````yaml /public-openapi.json get /wa/{app_id}/templates/{source_id}
openapi: 3.0.3
info:
  title: Connexease Public API
  version: 1.0.0
  description: >-
    Panel-independent API for managing WhatsApp Business operations from your
    own servers.


    Every endpoint is scoped to the organization resolved from your secret key.
    Read endpoints are uncached and proxy straight to the source.


    **On-premises installations** are served from your own domain with an extra
    `/public` segment: `https://{your_domain}/public/api/v1/...`.
    Authentication, bodies, responses, and error codes are identical.
servers:
  - url: https://public-api.gateway.connexease.com/api/v1
    description: Production
security:
  - secretKey: []
tags:
  - name: Analytics
    description: Organization-wide message volume.
  - name: Application
    description: The WhatsApp business profile linked to an application.
  - name: Template
    description: >-
      The full template lifecycle: create, list, inspect, update, delete, and
      measure.
  - name: Media
    description: >-
      Uploads that produce the single-use handle for template headers and the
      profile picture.
  - name: Developers
    description: Webhook configuration and API keys.
paths:
  /wa/{app_id}/templates/{source_id}:
    get:
      tags:
        - Template
      summary: Get Template Detail
      description: >-
        Returns the current detail of a single template by its Meta `sourceId`.
        Read fresh directly from Meta, with no caching.


        With `expand=components` the header, body, footer, button, carousel, and
        limited-time offer detail is included as well.


        Note that component buttons come back in snake_case (`phone_number`,
        `otp_type`, `package_name`) — different from the camelCase keys you send
        when creating a template.
      operationId: getTemplateDetail
      parameters:
        - $ref: '#/components/parameters/AppId'
        - $ref: '#/components/parameters/SourceId'
        - name: expand
          in: query
          required: false
          description: >-
            Repeatable. `components` also returns the components; metadata only
            by default. Any other value is rejected with `422`.
          schema:
            type: array
            items:
              type: string
              enum:
                - components
          style: form
          explode: true
      responses:
        '200':
          description: The template.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Template'
                  isSuccess:
                    type: boolean
                    enum:
                      - true
              example:
                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
                          phone_number: tel:+90-555-123-45-67
                  qualityScore: GREEN
                  rejectedReason: NONE
                  parameterFormat: POSITIONAL
                isSuccess: true
        '401':
          description: >-
            Secret key missing or invalid (`ORGANIZATION_SECRET_010` / `011`),
            or Meta token invalid or expired (`META_034`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: Meta permission denied (`META_035`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: >-
            `app_id` not in the organization (`APPLICATION_004`), or `source_id`
            not found in Meta (`META_075`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              example:
                errors:
                  code: META_075
                  group: NOT_FOUND
                  description: Template with 0000000000 not found in Meta.
                isSuccess: false
        '422':
          description: Invalid `expand` value — anything other than `components`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Meta rate limit (`META_036`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '502':
          description: General Meta-side fetch failure (`META_004`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  parameters:
    AppId:
      name: app_id
      in: path
      required: true
      description: >-
        Application ID. Must belong to the organization resolved from your
        secret key, otherwise the request returns `404` with `APPLICATION_004`.
      schema:
        type: string
        example: app_7poyXj8GXuv76e
    SourceId:
      name: source_id
      in: path
      required: true
      description: The template's Meta source ID.
      schema:
        type: string
        example: '1234567890123456'
  schemas:
    Template:
      type: object
      description: >-
        Null fields (`id`, `createdAt`, `updatedAt`, `messageSendTtlSeconds`,
        `correctCategory`, `previousCategory`) are dropped from the response.
      properties:
        sourceId:
          type: string
          description: The template's Meta ID.
        name:
          type: string
        language:
          type: string
        category:
          $ref: '#/components/schemas/TemplateCategory'
        status:
          $ref: '#/components/schemas/TemplateStatus'
        components:
          type: array
          items:
            $ref: '#/components/schemas/TemplateComponent'
          description: Returned only with `expand=components`.
        qualityScore:
          $ref: '#/components/schemas/TemplateQualityScore'
        rejectedReason:
          $ref: '#/components/schemas/TemplateRejectedReason'
        parameterFormat:
          $ref: '#/components/schemas/TemplateParameterFormat'
    ErrorEnvelope:
      type: object
      description: >-
        Every failure shares this shape. `description` already has any `params`
        interpolated into it.
      properties:
        isSuccess:
          type: boolean
          enum:
            - false
        errors:
          type: object
          properties:
            code:
              type: string
              description: >-
                `VAL_*`, `WA_*`, `META_*`, `APPLICATION_*`,
                `ORGANIZATION_SECRET_*`, `REQ_001`, or `SYS_001`.
              example: META_075
            group:
              type: string
              enum:
                - VALIDATION
                - NOT_FOUND
                - CONFLICT
                - AUTHENTICATION
                - NOT_ALLOWED
                - LIMIT_EXCEEDED
                - SERVICE_UNAVAILABLE
                - SYSTEM
            description:
              type: string
              example: Template with 0000000000 not found in Meta.
            params:
              type: object
              additionalProperties: true
              description: >-
                Raw values interpolated into `description`. Present only on
                parametric messages.
            fields:
              type: object
              description: >-
                Field-level validation errors only. Field name (dot-joined for
                nested fields, list indices omitted) to its own `code` /
                `description` / `params`.
              additionalProperties:
                type: object
                properties:
                  code:
                    type: string
                  description:
                    type: string
                  params:
                    type: object
                    additionalProperties: true
          required:
            - code
            - group
            - description
      required:
        - isSuccess
        - errors
    TemplateCategory:
      type: string
      description: >-
        Determines which components are allowed. `UTILITY` for transactional
        messages, `MARKETING` for promotional, `AUTHENTICATION` for one-time
        passcodes.
      enum:
        - UTILITY
        - MARKETING
        - AUTHENTICATION
    TemplateStatus:
      type: string
      description: >-
        Review and lifecycle status. `UNKNOWN` means Meta reported a status this
        API does not recognise.
      enum:
        - APPROVED
        - PENDING
        - REJECTED
        - PAUSED
        - DISABLED
        - IN_APPEAL
        - PENDING_DELETION
        - DELETED
        - LIMIT_EXCEEDED
        - UNKNOWN
    TemplateComponent:
      type: object
      description: >-
        One component. Every field other than `type` is dropped when Meta does
        not report it.
      properties:
        type:
          type: string
          enum:
            - HEADER
            - BODY
            - FOOTER
            - BUTTONS
            - CAROUSEL
            - LIMITED_TIME_OFFER
        format:
          type: string
          enum:
            - TEXT
            - IMAGE
            - VIDEO
            - DOCUMENT
            - LOCATION
            - CAROUSEL
          description: >-
            `HEADER` only. A response header never reports `NONE` — the
            component is simply absent — but may report `CAROUSEL` for a
            carousel template.
        text:
          type: string
          description: '`HEADER` with `format: TEXT`, `BODY`, or `FOOTER`.'
        example:
          $ref: '#/components/schemas/ComponentExample'
        buttons:
          type: array
          items:
            $ref: '#/components/schemas/ComponentButton'
          description: '`BUTTONS` only.'
        cards:
          type: array
          description: >-
            `CAROUSEL` only. One entry per card, each holding its own
            `components` array limited to `HEADER`, `BODY`, and `BUTTONS`.
          items:
            type: object
            properties:
              components:
                type: array
                items:
                  $ref: '#/components/schemas/CardComponent'
        addSecurityRecommendation:
          type: boolean
          description: '`BODY` of an `AUTHENTICATION` template.'
        codeExpirationMinutes:
          type: integer
          description: '`FOOTER` of an `AUTHENTICATION` template.'
        limitedTimeOffer:
          $ref: '#/components/schemas/LimitedTimeOffer'
      required:
        - type
    TemplateQualityScore:
      type: string
      description: Quality rating derived by Meta from user feedback.
      enum:
        - GREEN
        - YELLOW
        - RED
        - UNKNOWN
    TemplateRejectedReason:
      type: string
      enum:
        - NONE
        - ABUSIVE_CONTENT
        - INVALID_FORMAT
        - PROMOTIONAL
        - TAG_CONTENT_MISMATCH
        - SCAM
        - INCORRECT_CATEGORY
        - UNKNOWN
    TemplateParameterFormat:
      type: string
      description: How variables are referenced within the template.
      enum:
        - POSITIONAL
        - NAMED
        - UNKNOWN
    ComponentExample:
      type: object
      description: Sample values Meta stores for the component's variables or media.
      properties:
        headerText:
          type: array
          items:
            type: string
          description: Sample values for the `TEXT` header variables.
        headerHandle:
          type: array
          items:
            type: string
          description: The media handle behind an `IMAGE` / `VIDEO` / `DOCUMENT` header.
        headerUrl:
          type: array
          items:
            type: string
          description: The resolved media URL, when Meta returns one instead of a handle.
        bodyText:
          type: array
          items:
            type: array
            items:
              type: string
          description: >-
            Sample values for the body variables — a list of value sets, so
            nested one level deeper than `headerText`.
    ComponentButton:
      type: object
      description: >-
        A button as Meta reports it. Note the snake_case keys — they differ from
        the camelCase keys used when creating a template.
      properties:
        type:
          type: string
          enum:
            - URL
            - PHONE_NUMBER
            - QUICK_REPLY
            - COPY_CODE
            - OTP
        text:
          type: string
          description: The label shown on the button.
        url:
          type: string
          description: '`URL` buttons: the target link, possibly containing `{{1}}`.'
        phone_number:
          type: string
          description: >-
            `PHONE_NUMBER` buttons. Meta returns RFC3966 form
            (`tel:+90-555-123-45-67`), not the E.164 form you sent.
        example:
          type: array
          items:
            type: string
          description: The dynamic-URL sample, or the `COPY_CODE` coupon code.
        otp_type:
          type: string
          enum:
            - COPY_CODE
            - ONE_TAP
            - ZERO_TAP
        autofill_text:
          type: string
        package_name:
          type: string
        signature_hash:
          type: string
        zero_tap_terms_accepted:
          type: boolean
    CardComponent:
      type: object
      description: >-
        A component inside a carousel card. A card is a reduced template: no
        footer, no limited-time offer.
      properties:
        type:
          type: string
          enum:
            - HEADER
            - BODY
            - BUTTONS
        format:
          type: string
          enum:
            - IMAGE
            - VIDEO
          description: '`HEADER` only.'
        text:
          type: string
          description: '`BODY` only.'
        example:
          $ref: '#/components/schemas/ComponentExample'
        buttons:
          type: array
          items:
            $ref: '#/components/schemas/ComponentButton'
    LimitedTimeOffer:
      type: object
      properties:
        text:
          type: string
          minLength: 1
          maxLength: 16
          description: Offer text on the banner, e.g. `Expiring offer!`.
        hasExpiration:
          type: boolean
          default: false
          description: >-
            When `true`, WhatsApp renders a countdown. This only controls
            whether the countdown is shown — the expiration timestamp itself is
            supplied per message at send time, so one approved template can
            serve different deadlines.
      required:
        - text
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >-
        Secret key in `Bearer sk_...` format. Server-to-server only — never
        embed it in a browser or mobile client. The organization is resolved
        from the key, so `organization_id` is never passed explicitly.

````