---
title: "Add custom email template"
method: POST
path: "/custom_email_templates"
tags: ["Notification"]
---

# Add custom email template

`POST /custom_email_templates`

## Request

- Base URL: `https://HOSTNAME:8887/api`
- URL: `https://HOSTNAME:8887/api/custom_email_templates`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/docs/custom_email_templates/post.ts> (a function with typed inputs; its response is checked against the schema)

Create custom email template.

## Request body

- object
  - `name` 'USER_CREATION' | 'QUEUE_CALL_LOST' | 'QUEUE_SLA' | 'QUEUE_CALLBACK' | 'QUEUE_CALLBACK_FAILED' | 'VOICEMAIL_RECEIVED' | 'CALL_REPORT_COMPLETED' | 'DISK_LOW' | 'EMERGENCY_CALL' | 'LICENSE_LIMITED' | 'RECHARGE' | 'CONFERENCE_INVITATION' | 'TRUNK_CONNECTED' | 'TRUNK_DISCONNECTED': Name of the email template: Can be either: - `USER_CREATION`: user creation notification. - `QUEUE_CALL_LOST`: call queue call lost notification. - `QUEUE_SLA`: call queue sla time reached notification. - `QUEUE_CALLBACK`: call queue callback notification. - `QUEUE_CALLBACK_FAILED`: call queue callback failed notification. - `VOICEMAIL_RECEIVED`: received voicemail notification. - `CALL_REPORT_COMPLETED`: call report completed notification. - `DISK_LOW`: low disk notification. - `EMERGENCY_CALL`: emergency call notification. - `LICENSE_LIMITED`: license limited notification. - `RECHARGE`: recharge notification. - `CONFERENCE_INVITATION`: meeting invitation notification. - `TRUNK_CONNECTED`: trunk connected notification. - `TRUNK_DISCONNECTED`: trunk disconnected notification.
  - `from` string: Notification email from field.
  - `subject` string: Notification email subject field.
  - `body` string: Notification email body.

## Response `201`

Created block code.

- object
  - `id` string: The unique ID of the resource.

## Other responses

- `4XX`: Error

---

[API](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api.md) - [All operations](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/revisions/577415d4a3d5?raw)
