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

# Obter template

> Retorna um template pelo id (ou nome), com body e variables. Inclui também source ("META" | "PILOT_STATUS"), metaStatus ("APPROVED" | "PENDING" | "REJECTED" | "DISABLED" | null), metaLanguage e sendable — em um número Meta Cloud API só templates com source=META + metaStatus=APPROVED são enviáveis. 404 TEMPLATE_NOT_FOUND se não existir no escopo do número. Requer key escopada a número.

**Requer uma chave com escopo de número.**



## OpenAPI

````yaml openapi.pt.json GET /v1/templates/{id}
openapi: 3.1.0
info:
  title: API Pilot Status
  version: 1.0.0
  license:
    name: Pilot Status Terms of Service
    url: https://pilotstatus.com.br/terms
  description: >-
    API REST pública do Pilot Status. Autentique com o header `x-api-key:
    ps_...` (ou `x-api-key-id`). Base URL: https://pilotstatus.com.br
servers:
  - url: https://pilotstatus.com.br
security:
  - apiKey: []
  - apiKeyId: []
paths:
  /v1/templates/{id}:
    get:
      tags:
        - Templates
      summary: Obter template
      description: >-
        Retorna um template pelo id (ou nome), com body e variables. Inclui
        também source ("META" | "PILOT_STATUS"), metaStatus ("APPROVED" |
        "PENDING" | "REJECTED" | "DISABLED" | null), metaLanguage e sendable —
        em um número Meta Cloud API só templates com source=META +
        metaStatus=APPROVED são enviáveis. 404 TEMPLATE_NOT_FOUND se não existir
        no escopo do número. Requer key escopada a número.


        **Requer uma chave com escopo de número.**
      operationId: get_templates_id
      parameters:
        - name: id
          in: path
          required: true
          description: Id ou nome do template.
          schema:
            type: string
          example: boas_vindas
      responses:
        '200':
          description: Obter template
          content:
            application/json:
              example:
                id: tpl_01HZX...
                name: boas_vindas
                category: UTILITY
                body: '{"body":{"text":"Olá {{1}}, seja bem-vindo!"}}'
                variables:
                  - nome
                source: META
                metaStatus: APPROVED
                metaLanguage: pt_BR
                sendable: true
        '400':
          description: Payload ou parâmetros inválidos
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Validation error
        '401':
          description: Header `x-api-key` / `x-api-key-id` ausente ou inválido
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Unauthorized
        '403':
          description: Chave com escopo de tenant usada em endpoint com escopo de número
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Tenant-scoped keys cannot call number endpoints
                code: TENANT_SCOPE_NOT_ALLOWED
        '429':
          description: Limite de taxa excedido
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  code:
                    type: string
              example:
                error: Too many requests
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Sua chave de API ps_
    apiKeyId:
      type: apiKey
      in: header
      name: x-api-key-id
      description: Id da chave de API (alternativa ao x-api-key)

````