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

# List templates

> Returns communication templates for the company. All filter parameters are optional.

Accepts an API key (`x-token`), delegate token (`Authorization: DelegateToken <token>`),
or partner token (`Authorization: Bearer <token>` with `templates` permission).
When using a partner token, pass `companyId` as a query parameter.




## OpenAPI

````yaml /openapi.yaml get /api/templates
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:
    get:
      tags:
        - Templates
      summary: List templates
      description: >
        Returns communication templates for the company. All filter parameters
        are optional.


        Accepts an API key (`x-token`), delegate token (`Authorization:
        DelegateToken <token>`),

        or partner token (`Authorization: Bearer <token>` with `templates`
        permission).

        When using a partner token, pass `companyId` as a query parameter.
      operationId: listTemplates
      parameters:
        - name: companyId
          in: query
          schema:
            type: string
          description: >-
            Company ID. Required when using a partner token; resolved
            automatically for API key and delegate token auth.
        - name: templateType
          in: query
          schema:
            type: string
            enum:
              - sms
              - email
              - form
              - eSignature
              - pdf
              - blockDocument
          description: Filter by template type.
        - name: aptletUuid
          in: query
          schema:
            type: string
          description: Filter by associated board UUID.
        - name: archived
          in: query
          schema:
            type: boolean
          description: Filter by archived status.
      responses:
        '200':
          description: Array of templates.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Template'
        '400':
          description: Missing companyId.
        '401':
          description: Invalid or missing credential.
      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>`'

````