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

# List all letter templates



## OpenAPI

````yaml openapi-core.json GET /v1/letter_templates
openapi: 3.1.0
info:
  title: Yorlet Core API
  description: Core platform APIs including buildings, customers, units, and tasks.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/letter_templates:
    get:
      tags:
        - Letter templates
      summary: List all letter templates
      operationId: letter_templates_list
      responses:
        '200':
          description: >-
            An object with a data property that contains an array of letter
            templates.
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: number
                    description: Total number of items in the list.
                    example: 1
                  has_more:
                    type: boolean
                    description: Whether more items are available.
                    example: false
                  object:
                    type: string
                    enum:
                      - list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Unique identifier for the object.
                        created:
                          type: number
                          description: >-
                            Time at which the object was created. Measured in
                            seconds since the Unix epoch.
                        account:
                          type: string
                          description: >-
                            The account that the object belongs to. Only
                            returned if the request is made with a valid
                            Yorlet-Context header.
                        deleted:
                          type: boolean
                          default: false
                          description: Only returned if the object has been deleted.
                        object:
                          type: string
                          enum:
                            - letter_template
                        address_position:
                          type: string
                          enum:
                            - left
                            - right
                          description: >-
                            Which side of page 1 the recipient address window is
                            printed on.
                        blocks:
                          type: array
                          items:
                            oneOf:
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - heading
                                  content:
                                    type: string
                                    minLength: 1
                                    description: >-
                                      Heading text. Supports the same merge
                                      fields as text blocks.
                                required:
                                  - type
                                  - content
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - signature
                                  file:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      File ID of a signature image. When
                                      omitted, `name` is printed in a signature
                                      style.
                                  name:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      Name printed under the signature. Defaults
                                      to the account name.
                                required:
                                  - type
                              - type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - text
                                  content:
                                    type: string
                                    minLength: 1
                                    description: >-
                                      Body text. Supports merge fields such as
                                      `{{customer.name}}` and
                                      `{{owner.address}}`.
                                required:
                                  - type
                                  - content
                          description: Ordered content blocks that make up the letter body.
                        description:
                          type:
                            - string
                            - 'null'
                          description: >-
                            An optional description of when to use this
                            template.
                        merge_fields:
                          type: array
                          items:
                            type: string
                          description: >-
                            Merge fields that can be interpolated in heading and
                            text blocks.
                        name:
                          type: string
                          description: The name of the letter template.
                        recipient_type:
                          type: string
                          enum:
                            - any
                            - customer
                            - owner
                          description: >-
                            Who this template is intended for. `any` can be used
                            with either customers or owners.
                        variables:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                pattern: ^[a-z][a-z0-9_]*$
                                description: >-
                                  The merge-field key. Interpolated as
                                  `{{variables.<key>}}` in heading and text
                                  blocks.
                              label:
                                type: string
                                minLength: 1
                                description: >-
                                  A human-readable name shown when filling in
                                  this variable.
                            required:
                              - key
                              - label
                          description: >-
                            Custom variables that can be passed when creating a
                            letter from this template.
                      required:
                        - id
                        - created
                        - object
                        - address_position
                        - blocks
                        - description
                        - merge_fields
                        - name
                        - recipient_type
                        - variables
                required:
                  - count
                  - has_more
                  - object
                  - data
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````