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

# Get Templates

The **Get Templates** endpoint retrieves a list of all templates that you created through the ParDocs API. Templates define the structure of the data you can extract from various documents using the API. This endpoint is useful for understanding the data formats and fields that can be extracted, ensuring you can properly process and utilize the data returned by the API.

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.pardocs.com/v1/templates \
    --header 'x-api-key: <api-key>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.pardocs.com/v1/templates"
  headers = {"x-api-key": "<api-key>"}

  response = requests.get(url, headers=headers)

  print(response.json())
  ```
</RequestExample>


## OpenAPI

````yaml openapi-templates GET /v1/templates
openapi: 3.1.0
info:
  title: Template API
  version: 1.0.1
servers:
  - url: https://api.pardocs.com
security:
  - ApiKeyAuth: []
paths:
  /v1/templates:
    get:
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplatesResponse'
        4XX:
          description: unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    TemplatesResponse:
      title: Templates
      type: array
      items:
        $ref: '#/components/schemas/TemplateResponse'
    Error:
      required:
        - detail
      type: object
      properties:
        detail:
          type: string
    TemplateResponse:
      type: object
      properties:
        template_id:
          type: string
          description: ''
        document_type:
          type: string
          description: The type of the document.
        template_data:
          type: object
          description: The key-value pairs of information extracted from the document.
        template_created_at:
          type: integer
          description: ''
        template_updated_at:
          type: integer
          description: ''
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````