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

# Get a Whatsapp message template by ID



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/whatsapp/management.yml get /whatsapp/message_templates/{id}
openapi: 3.1.0
info:
  title: Telnyx WhatsApp Management API
  version: 2.0.0
  description: >
    API for managing WhatsApp Business Accounts (WABAs), phone numbers, and
    message templates.


    Use these endpoints to:

    - List and manage WhatsApp Business Accounts

    - Configure phone numbers for WhatsApp

    - Create and manage message templates

    - Set up webhook configurations
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /whatsapp/message_templates/{id}:
    get:
      tags:
        - Whatsapp Message Templates
      summary: Get a Whatsapp message template by ID
      operationId: GetWhatsappTemplate
      parameters:
        - $ref: '#/components/parameters/WhatsappTemplateId'
      responses:
        '200':
          $ref: '#/components/responses/WhatsappTemplateSingleResponse'
          description: Template details
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const whatsappMessageTemplate = await
            client.whatsappMessageTemplates.retrieve('id');


            console.log(whatsappMessageTemplate.data);
        - lang: Python
          source: >-
            import os

            from telnyx import Telnyx


            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )

            whatsapp_message_template =
            client.whatsapp_message_templates.retrieve(
                "id",
            )

            print(whatsapp_message_template.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\twhatsappMessageTemplate, err := client.WhatsappMessageTemplates.Get(context.TODO(), \"id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", whatsappMessageTemplate.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.whatsappmessagetemplates.WhatsappMessageTemplateRetrieveParams;

            import
            com.telnyx.sdk.models.whatsappmessagetemplates.WhatsappMessageTemplateRetrieveResponse;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    WhatsappMessageTemplateRetrieveResponse whatsappMessageTemplate = client.whatsappMessageTemplates().retrieve("id");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            whatsapp_message_template =
            telnyx.whatsapp_message_templates.retrieve("id")


            puts(whatsapp_message_template)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $whatsappMessageTemplate = $client->whatsappMessageTemplates->retrieve('id');

              var_dump($whatsappMessageTemplate);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx whatsapp-message-templates retrieve \
              --api-key 'My API Key' \
              --id id
components:
  parameters:
    WhatsappTemplateId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Whatsapp message template ID
  responses:
    WhatsappTemplateSingleResponse:
      description: Successful response with Whatsapp template
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/WhatsappTemplateData'
    messaging_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/messaging_Errors'
  schemas:
    WhatsappTemplateData:
      type: object
      properties:
        id:
          type: string
        record_type:
          type: string
          example: whatsapp_message_template
        template_id:
          type: string
        name:
          type: string
        category:
          type: string
          enum:
            - MARKETING
            - UTILITY
            - AUTHENTICATION
        language:
          type: string
        status:
          type: string
          description: >-
            Current template status from Meta (e.g. PENDING, APPROVED, REJECTED,
            PAUSED, DISABLED). Additional statuses may be returned as Meta
            evolves the template lifecycle.
        rejection_reason:
          type: string
        components:
          type: array
          items:
            type: object
          description: >-
            Template components (header, body, footer, buttons) as submitted,
            including example values.
        whatsapp_business_account:
          type: object
          properties:
            id:
              type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    messaging_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/messaging_Error'
    messaging_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
          x-format: integer
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              format: json-pointer
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````