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

# List all templates

> Returns every template visible to the caller in their organization, optionally filtered by `type` (e.g. `automation`, `message`). Powers the template picker in composers and the automation builder.



## OpenAPI

````yaml /api-reference/openapi.yaml get /api/templates
openapi: 3.0.3
info:
  title: Tether Relay and Tether API
  version: 1.0.0
  description: >-
    Route-derived OpenAPI contract generated from tether-relay backend sources.
    Regenerate with scripts/sync-openapi-from-backend.mjs.
servers:
  - url: https://your-instance.example.com
    description: Production
  - url: http://localhost:2212
    description: Local API service
security: []
tags:
  - name: AI
  - name: Applications
  - name: Approval
  - name: Auth
  - name: Automations
  - name: Calls
  - name: Campaigns
  - name: Contact Analytics
  - name: Contact Metrics
  - name: Contact Notes
  - name: Contacts
  - name: Conversation Monitor
  - name: Conversations
  - name: Departments
  - name: Email
  - name: Escalation Dashboard
  - name: Event Logs
  - name: Google Sheets
  - name: Marketplace
  - name: Messages
  - name: Notification Sounds
  - name: Notifications
  - name: Org Snapshots
  - name: Organizations
  - name: Outreach
  - name: Outreach Metrics
  - name: Outreach Sources
  - name: Pipelines
  - name: Processes
  - name: Prompts
  - name: Reminders
  - name: Sms
  - name: Templates
  - name: Traces
  - name: Training
  - name: Upload
  - name: User Snapshots
  - name: Users
  - name: Vertical
  - name: Webchats
  - name: Webhook
paths:
  /api/templates:
    get:
      tags:
        - Templates
      summary: List all templates
      description: >-
        Returns every template visible to the caller in their organization,
        optionally filtered by `type` (e.g. `automation`, `message`). Powers the
        template picker in composers and the automation builder.
      operationId: get_templates
      parameters:
        - in: query
          name: type
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Templates returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplatesListResponse'
        '500':
          description: Failed to fetch templates
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplatesErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    TemplatesListResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
        data:
          type: array
          items:
            $ref: '#/components/schemas/TemplateItem'
      required:
        - success
        - data
      additionalProperties: true
      example:
        success: true
        data:
          - _id: 66a0a0b0c0d0e0f0a0b0c0d0
            name: Demo follow-up
            template: Hi {{firstName}}, thanks for the demo today!
            type: message
            category: sales-followup
            organizationId: 65a0e0e0e0e0e0e0e0e0e0e0
            createdBy: 65b1f0a2c3d4e5f6a7b8c9d0
            createdAt: '2026-04-12T08:00:00.000Z'
            updatedAt: '2026-04-12T08:00:00.000Z'
    TemplatesErrorResponse:
      type: object
      description: Error envelope used by templates endpoints.
      properties:
        success:
          type: boolean
          enum:
            - false
        message:
          type: string
      additionalProperties: true
      example:
        success: false
        message: Template not found
    TemplateItem:
      type: object
      description: >-
        Mongoose `Template` document. `category` is omitted when `type ===
        "automation"`.
      properties:
        _id:
          type: string
        name:
          type: string
        template:
          type: string
        type:
          type: string
        category:
          type: string
          nullable: true
        userId:
          type: string
        organizationId:
          type: string
        createdBy:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      additionalProperties: true
      example:
        _id: 66a0a0b0c0d0e0f0a0b0c0d0
        name: Demo follow-up
        template: Hi {{firstName}}, thanks for the demo today!
        type: message
        category: sales-followup
        userId: 65b1f0a2c3d4e5f6a7b8c9d0
        organizationId: 65a0e0e0e0e0e0e0e0e0e0e0
        createdBy: 65b1f0a2c3d4e5f6a7b8c9d0
        createdAt: '2026-04-12T08:00:00.000Z'
        updatedAt: '2026-04-12T08:00:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````