---
title: "POST /mailTemplate"
method: POST
path: "/mailTemplate"
tags: ["mailTemplate"]
---

# POST /mailTemplate

`POST /mailTemplate`

## Request

- Base URL: `https://www.weclapp.com/api/nullapi/v2`
- URL: `https://www.weclapp.com/api/nullapi/v2/mailTemplate`
- Auth: API key in header `AuthenticationToken`
- TypeScript: <https://skmtc.dev/weclapp/apis/weclapp-api/docs/mailTemplate/post.ts> (a function with typed inputs; its response is checked against the schema)

create a mailTemplate

## Query parameters

- `dryRun` boolean

## Request body

- MailTemplate
  - `id` string
  - `version` string
  - `bccEmailAddresses` string
  - `ccEmailAddresses` string
  - `createdDate` integer
  - `creatorId` string, required
  - `lastModifiedDate` integer
  - `name` string
  - `subject` string
  - `text` string
  - `toEmailAddresses` string
  - `type` 'EMAIL' | 'LETTER', required
  - `useAsDefault` boolean

## Response `201`

mailTemplate create response

- MailTemplate
  - `id` string
  - `version` string
  - `bccEmailAddresses` string
  - `ccEmailAddresses` string
  - `createdDate` integer
  - `creatorId` string, required
  - `lastModifiedDate` integer
  - `name` string
  - `subject` string
  - `text` string
  - `toEmailAddresses` string
  - `type` 'EMAIL' | 'LETTER', required
  - `useAsDefault` boolean

## Other responses

- `default`: error response

## Changes

- **2026-11-07** `0e021229755d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/weclapp/apis/weclapp-api/changes/mailTemplate/post.md)

---

[API](https://skmtc.dev/weclapp/apis/weclapp-api.md) - [All operations](https://skmtc.dev/weclapp/apis/weclapp-api/llms.txt) - [OpenAPI document](https://skmtc.dev/weclapp/apis/weclapp-api/revisions/0e021229755d?raw)
