---
title: "Get All With Filters"
method: GET
path: "/mail_templates"
tags: ["Mail templates"]
---

# Get All With Filters

`GET /mail_templates`

## Request

- Base URL: `https://api.sandbox.monite.com/v1`
- URL: `https://api.sandbox.monite.com/v1/mail_templates`
- Auth: HTTP bearer

Get all custom templates

## Query parameters

- `order` 'asc' | 'desc'
- `limit` integer
- `pagination_token` string
- `sort` 'type' | 'name'
- `type` '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'
- `type__in` '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'
- `type__not_in` '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'
- `is_default` boolean
- `name` string
- `name__iexact` string
- `name__contains` string
- `name__icontains` string

## Headers

- `x-monite-version` string, required

## Response `200`

Successful Response

- CustomTemplatesPaginationResponse
  - `data` CustomTemplateDataSchema[], required: All user-defined email templates
    - `id` string, uuid, required: ID of email template
    - `created_at` string, date-time, required: Template created date and time
    - `updated_at` string, date-time, required: Template updated date and time
    - `body_template` string, required: Jinja2 compatible email body template
    - `is_default` boolean, required: Is default template
    - `language` string, required: Lowercase ISO code of language
    - `name` string, required: Name of the template
    - `subject_template` string, required: Jinja2 compatible email subject template
    - `type` string, required: Document type of content
  - `next_pagination_token` string: 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` string: 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).

## Other responses

- `422`: Validation Error
- `500`: Internal Server Error

---

[API](https://skmtc.dev/monite/apis/monite-3.md) - [All operations](https://skmtc.dev/monite/apis/monite-3/llms.txt) - [OpenAPI document](https://skmtc.dev/monite/apis/monite-3/revisions/c13be6f83ce9?raw)
