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

# Get a template

> Returns a single template by its ID. The template must belong to the authenticated company.



## OpenAPI

````yaml /openapi.yaml get /api/templates/{id}
openapi: 3.0.3
info:
  title: Aptly API
  version: '1.0'
  description: >
    The Aptly API lets you read and write cards on any Aptly board from external
    systems.


    All requests require an API key passed as the `x-token` header.

    API keys are scoped to your company and work across all boards.
servers:
  - url: https://core-api.getaptly.com
    description: Production
security:
  - ApiKeyHeader: []
paths:
  /api/templates/{id}:
    get:
      tags:
        - Templates
      summary: Get a template
      description: >-
        Returns a single template by its ID. The template must belong to the
        authenticated company.
      operationId: getTemplate
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Template ID.
        - name: companyId
          in: query
          schema:
            type: string
          description: Required for partner token auth.
      responses:
        '200':
          description: Template record.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Template'
        '401':
          description: Invalid or missing credential.
        '404':
          description: Template not found.
      security:
        - ApiKeyHeader: []
        - DelegateToken: []
        - PartnerBearer: []
components:
  schemas:
    Template:
      type: object
      properties:
        _id:
          type: string
          description: Template ID.
        companyId:
          type: string
          description: Company the template belongs to.
        name:
          type: string
          description: Template display name.
        templateType:
          type: string
          enum:
            - sms
            - email
            - form
            - eSignature
            - pdf
            - blockDocument
          description: Template category.
        archived:
          type: boolean
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
          description: User ID of the creator, or `"api"` if created via the API.
        updatedAt:
          type: string
          format: date-time
      additionalProperties:
        description: >-
          Additional properties depend on the templateType (e.g. `subject`,
          `content` for email templates).
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: x-token
    DelegateToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Delegate token issued by the platform. Format: `DelegateToken <token>`'
    PartnerBearer:
      type: http
      scheme: bearer
      description: 'Partner token. Format: `Authorization: Bearer <token>`'

````