# Get WhatsApp template

URL: https://docs.dixa.io/openapi/dixa-api/beta/whatsapp-templates/getwhatsapptemplatestemplateid

Get a WhatsApp template by id with template's category and approval status.

## GET /beta/whatsapp/templates/{templateId}

- Server: https://dev.dixa.io
- Auth: `Authorization: <API token>` header

### Request example

```bash
curl -X GET 'https://dev.dixa.io/beta/whatsapp/templates/{templateId}' \
  -H 'Authorization: <API token>'
```

### Response examples

#### 200 The WhatsApp template

```json
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "order_confirmation",
    "language": "en",
    "createdAt": "2026-01-01T00:00:00Z",
    "category": "UTILITY",
    "approvalStatus": "approved",
    "body": "Your order {{1}} has been confirmed.",
    "variables": {
      "1": "12345"
    }
  }
}
```

#### 400

```json
{
  "message": "Decoding failure in request"
}
```

#### 404 An entity in this request could not be found

```json
{
  "message": "The requested resource could not be found"
}
```

#### 500 Internal failure during request processing

```json
{
  "message": "There was an internal server error while processing the request"
}
```

## OpenAPI definition

The operation and the schemas used, from the full spec at https://docs.dixa.io/openapi-specs/dixa-beta.yaml. Request and response examples are above.

```yaml
openapi: 3.0.3
info:
  title: Dixa API
  version: beta
servers:
  - url: https://dev.dixa.io
security:
  - ApiKeyAuth: []
paths:
  /beta/whatsapp/templates/{templateId}:
    get:
      tags:
        - WhatsApp Templates
      summary: Get WhatsApp template
      description: Get a WhatsApp template by id with template's category and approval
        status.
      operationId: getWhatsappTemplatesTemplateid
      parameters:
        - name: templateId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        "200":
          description: The WhatsApp template
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/GetWhatsappTemplateOutput"
        "400":
          description: ""
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/BadRequest"
        "404":
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/NotFound"
        "500":
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ServerError"
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
  schemas:
    GetWhatsappTemplateOutput:
      title: GetWhatsappTemplateOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: "#/components/schemas/WhatsappTemplate"
    WhatsappTemplate:
      title: WhatsappTemplate
      type: object
      required:
        - id
        - name
        - language
        - createdAt
        - body
        - variables
      properties:
        id:
          type: string
        name:
          type: string
        language:
          type: string
        createdAt:
          type: string
        category:
          type: string
        approvalStatus:
          type: string
        body:
          type: string
        variables:
          $ref: "#/components/schemas/Map_String"
    Map_String:
      title: Map_String
      type: object
      additionalProperties:
        type: string
    BadRequest:
      title: BadRequest
      type: object
      required:
        - message
      properties:
        message:
          type: string
    NotFound:
      title: NotFound
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ServerError:
      title: ServerError
      type: object
      required:
        - message
      properties:
        message:
          type: string
```
