For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • API Concepts
    • Overview
    • Environments and URLs
    • Authentication
    • API versioning
    • Rate limiting
    • HTTP headers
    • Pagination, sorting, and filtering
  • General
  • Common
  • Accounts payable
  • Accounts receivable
  • E-invoicing
  • Payments
  • Accounting integration
  • Expense management
  • Utilities
      • GETGet All With Filters
      • POSTCreate
      • POSTPreview
      • GETGet All System Templates
      • GETGet
      • DELDelete
      • PATCHUpdate
      • POSTMake Default
LogoLogo
API StatusPartner Portal
UtilitiesMail templates

Create

POST
/mail_templates
POST
/v1/mail_templates
$curl -X POST https://api.sandbox.monite.com/v1/mail_templates \
> -H "x-monite-version: 2023-09-01" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "body_template": "body_template",
> "name": "name",
> "subject_template": "subject_template",
> "type": "receivables_quote"
>}'
1{
2 "id": "id",
3 "created_at": "2024-01-15T09:30:00Z",
4 "updated_at": "2024-01-15T09:30:00Z",
5 "body_template": "body_template",
6 "is_default": true,
7 "language": "language",
8 "name": "name",
9 "subject_template": "subject_template",
10 "type": "type"
11}
Create custom template
Was this page helpful?
Previous

Preview

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-monite-versionstringRequired

Request

This endpoint expects an object.
body_templatestringRequired>=1 character
Jinja2 compatible string with email body
namestringRequired1-128 characters
Custom template name
subject_templatestringRequired>=1 character
Jinja2 compatible string with email subject
typeenumRequired
Document type of content
is_defaultbooleanOptionalDefaults to false
Is default template
languageenumOptional
Lowercase ISO code of language

Response

Successful Response
idstringformat: "uuid"
ID of email template
created_atdatetime
Template created date and time
updated_atdatetime
Template updated date and time
body_templatestring
Jinja2 compatible email body template
is_defaultboolean
Is default template
languagestring<=4 characters
Lowercase ISO code of language
namestring<=128 characters
Name of the template
subject_templatestring<=2048 characters
Jinja2 compatible email subject template
typestring
Document type of content

Errors

422
Post Mail Templates Request Unprocessable Entity Error
500
Post Mail Templates Request Internal Server Error