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

# List templates

> List all templates for the authenticated user



## OpenAPI

````yaml https://vortexpdf.com/openapi get /api/v1/templates
openapi: 3.0.0
info:
  title: Vortex PDF
  version: '1.0'
servers:
  - url: https://vortexpdf.com
    variables: {}
security: []
tags: []
paths:
  /api/v1/templates:
    get:
      tags:
        - Templates
      summary: List templates
      description: List all templates for the authenticated user
      operationId: VortexWeb.API.V1.TemplateController.index
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/templates_response'
          description: Templates response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/auth_error_response'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/auth_error_response'
          description: Forbidden
      callbacks: {}
      security:
        - authorization: []
components:
  schemas:
    templates_response:
      description: Response schema for multiple templates
      properties:
        data:
          items:
            $ref: '#/components/schemas/template'
          type: array
      required:
        - data
      title: templates_response
      type: object
    auth_error_response:
      description: Response when authentication or authorization fails
      example:
        error: unauthorized
        message: Authentication required to access this resource
      properties:
        error:
          description: Error message describing the authentication or authorization failure
          enum:
            - unauthorized
            - forbidden
            - invalid_token
            - expired_token
            - insufficient_permissions
          type: string
        message:
          description: A more detailed message explaining the error
          type: string
      required:
        - error
      title: auth_error_response
      type: object
    template:
      description: A template object
      example:
        content: <h1>Invoice</h1><p>This is a sample invoice template</p>
        id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        inserted_at: '2020-01-01T00:00:00Z'
        name: Invoice Template
        preview_context:
          amount: 1000
          customer: Acme Inc.
        updated_at: '2020-01-01T00:00:00Z'
      properties:
        content:
          description: The HTML content of the template
          type: string
        id:
          description: Template ID
          format: uuid
          type: string
        inserted_at:
          description: Creation timestamp
          format: date-time
          type: string
        name:
          description: The name of the template
          type: string
        preview_context:
          description: JSON context for template preview
          type: object
        updated_at:
          description: Update timestamp
          format: date-time
          type: string
      required:
        - id
        - name
        - content
        - inserted_at
        - updated_at
      title: template
      type: object
  securitySchemes:
    authorization:
      description: Manage your API keys at https://vortexpdf.com/api-keys
      scheme: bearer
      type: http

````