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

# Get All With Filters

> Get all custom templates



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json get /finops/v1/mail-templates
openapi: 3.1.0
info:
  title: Tesouro Partner API
  version: '2025-06-23'
  description: The Tesouro REST API, for Tesouro partners to integrate with our solution.
  termsOfService: https://tesouro.com/terms
  contact:
    name: Tesouro team
    url: https://tesouro.com/about/
    email: developers@tesouro.com
servers:
  - url: https://api.sandbox.tesouro.com
    description: Sandbox
security: []
tags:
  - name: Accounting connections
  - name: Accounting data pull
  - name: Accounting synchronized records
  - name: Accounting tax rates
  - name: Analytics
  - name: Approval policies
  - name: Approval requests
  - name: Bank details
  - name: Comments
  - name: Cost centers
  - name: Counterpart VAT IDs
  - name: Counterpart addresses
  - name: Counterpart bank accounts
  - name: Counterpart contacts
  - name: Counterparts
  - name: Credit notes
  - name: Custom tax rates
  - name: Delivery notes
  - name: Documents
  - name: Entities
  - name: Entity users
  - name: Events
  - name: Files
  - name: Identity
  - name: Ledger accounts
  - name: Mail templates
  - name: Mailbox domains
  - name: Mailboxes
  - name: Measure units
  - name: OCR
  - name: Overdue reminders
  - name: PDF templates
  - name: Payable line items
  - name: Payables
  - name: Payment intents
  - name: Payment links
  - name: Payment methods
  - name: Payment records
  - name: Payment reminders
  - name: Payment terms
  - name: Products
  - name: Projects
  - name: Purchase orders
  - name: Receipts
  - name: Receivables
  - name: Recurrences
  - name: Tags
  - name: Text templates
  - name: Transactions
  - name: VAT rates
  - name: Webhook deliveries
  - name: Webhook subscriptions
paths:
  /finops/v1/mail-templates:
    get:
      tags:
        - Mail templates
      summary: Get All With Filters
      description: Get all custom templates
      operationId: get_mail-templates
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2025-06-23'
          name: x-finops-version
          in: header
        - description: >-
            Sort order (ascending by default). Typically used together with the
            `sort` parameter.
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderEnum'
            default: asc
          name: order
          in: query
        - description: >-
            The number of items (0 .. 100) to return in a single page of the
            response. The response may contain fewer items if it is the last or
            only page.
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 100
          name: limit
          in: query
        - description: >-
            A pagination token obtained from a previous call to this endpoint.
            Use it to get the next or previous page of results for your initial
            query. If `pagination_token` is specified, all other query
            parameters are ignored and inferred from the initial query.


            If not specified, the first page of results will be returned.
          required: false
          schema:
            type: string
          name: pagination_token
          in: query
        - description: >-
            The field to sort the results by. Typically used together with the
            `order` parameter.
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/CustomTemplatesCursorFields'
          name: sort
          in: query
        - required: false
          schema:
            $ref: '#/components/schemas/DocumentObjectTypeRequestEnum'
          name: type
          in: query
        - required: false
          schema:
            items:
              $ref: '#/components/schemas/DocumentObjectTypeRequestEnum'
            type: array
          name: type__in
          in: query
        - required: false
          schema:
            items:
              $ref: '#/components/schemas/DocumentObjectTypeRequestEnum'
            type: array
          name: type__not_in
          in: query
        - required: false
          schema:
            type: boolean
          name: is_default
          in: query
        - required: false
          schema:
            type: string
          name: name
          in: query
        - required: false
          schema:
            type: string
          name: name__iexact
          in: query
        - required: false
          schema:
            type: string
          name: name__contains
          in: query
        - required: false
          schema:
            type: string
          name: name__icontains
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomTemplatesPaginationResponse'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    OrderEnum:
      type: string
      enum:
        - asc
        - desc
    CustomTemplatesCursorFields:
      type: string
      enum:
        - type
        - name
    DocumentObjectTypeRequestEnum:
      type: string
      enum:
        - receivables_quote
        - receivables_invoice
        - receivables_paid_invoice
        - receivables_credit_note
        - receivables_discount_reminder
        - receivables_final_reminder
        - payables_purchase_order
        - payables_notify_approver
        - payables_notify_payer
    CustomTemplatesPaginationResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/CustomTemplateDataSchema'
          type: array
          description: All user-defined email templates
        next_pagination_token:
          type: string
          description: >-
            A token that can be sent in the `pagination_token` query parameter
            to get the next page of results, or `null` if there is no next page
            (i.e. you've reached the last page).
        prev_pagination_token:
          type: string
          description: >-
            A token that can be sent in the `pagination_token` query parameter
            to get the previous page of results, or `null` if there is no
            previous page (i.e. you've reached the first page).
      additionalProperties: false
      type: object
      required:
        - data
    ErrorSchemaResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorSchema'
      type: object
      required:
        - error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    CustomTemplateDataSchema:
      properties:
        id:
          type: string
          format: uuid
          description: ID of email template
        created_at:
          type: string
          format: date-time
          description: Template created date and time
        updated_at:
          type: string
          format: date-time
          description: Template updated date and time
        body_template:
          type: string
          description: Jinja2 compatible email body template
        is_default:
          type: boolean
          description: Is default template
        language:
          type: string
          maxLength: 4
          description: Lowercase ISO code of language
        name:
          type: string
          maxLength: 128
          description: Name of the template
        subject_template:
          type: string
          maxLength: 2048
          description: Jinja2 compatible email subject template
        type:
          type: string
          description: Document type of content
      additionalProperties: false
      type: object
      required:
        - id
        - created_at
        - updated_at
        - body_template
        - is_default
        - language
        - name
        - subject_template
        - type
    ErrorSchema:
      properties:
        message:
          type: string
      type: object
      required:
        - message
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````