> For the complete documentation index, see [llms.txt](https://support.portsip.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.portsip.com/development-portsip/rest-apis/version-22.6/notification.md).

# Notification

Manage notification functions.

## List system email templates

> List all of system email templates<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/email_templates":{"get":{"tags":["Notification"],"operationId":"listSystemEmailTemplates","summary":"List system email templates","description":"List all of system email templates\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["2FA_VERIFICATION","CPU_EXCEEDED","HARD_DISK_EXCEEDED","IP_BLOCKED","LICENSE_LIMIT","MEMORY_EXCEEDED","RESET_PASSWORD","SERVICE_CONNECTED","SERVICE_DISCONNECTED","TENANT_DISK_QUOTA_LIMIT_REACHED","TRUNK_CALL_LIMIT_REACHED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","UPDATE_PUSH_CERTS_FAILED","WEBHOOK_QUEUE_TOO_LARGE"],"description":"The name of the system email template.   \nCan be either:   \n- `2FA_VERIFICATION`: Authentication with two factor notification.\n- `CPU_EXCEEDED`: CPU usage exceeded threshold notification.\n- `HARD_DISK_EXCEEDED`: Hard disk usage exceeded threshold notification.\n- `IP_BLOCKED`: IP adddredd blocked notification.\n- `LICENSE_LIMIT`: License limited notification.\n- `MEMORY_EXCEEDED`: Memory usage exceeded threshold notification.\n- `RESET_PASSWORD`: Reset password notification.\n- `SERVICE_CONNECTED`: Service connected notification.\n- `SERVICE_DISCONNECTED`: Service disconnected notification.\n- `TENANT_DISK_QUOTA_LIMIT_REACHED`: Tenant disk quota limited notification.\n- `TRUNK_CALL_LIMIT_REACHED`: Trunk call limited notification.\n- `TRUNK_CONNECTED`: Trunk connected notification.\n- `TRUNK_DISCONNECTED`: Trunk disconnected notification.\n- `UPDATE_PUSH_CERTS_FAILED`: Update push certificates failed notification.\n- `WEBHOOK_QUEUE_TOO_LARGE`: Webhook queue full notification.\n"},"from":{"type":"string","description":"Notification email from field.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"body":{"type":"string","description":"Notification email body.\n"},"protected":{"type":"boolean","description":"Indicates whether the template is system-protected:\n- true: System default template (read-only, cannot be modified)\n- false: Custom template (editable)\n"}}},"description":"A collection of system email templates.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve a custom email template by its name.

> This API fetches the details of a custom email template (protected=false) based on its name.\
> &#x20; \- System default templates (protected=true) will not be returned.\
> &#x20; \- If no custom template exists with the given name, the API returns a 404 Not Found.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/email_templates/{name}":{"get":{"tags":["Notification"],"operationId":"getSystemEmailTemplateByName","summary":"Retrieve a custom email template by its name.","description":"This API fetches the details of a custom email template (protected=false) based on its name.\n  - System default templates (protected=true) will not be returned.\n  - If no custom template exists with the given name, the API returns a 404 Not Found.\n","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["2FA_VERIFICATION","CPU_EXCEEDED","HARD_DISK_EXCEEDED","IP_BLOCKED","LICENSE_LIMIT","MEMORY_EXCEEDED","RESET_PASSWORD","SERVICE_CONNECTED","SERVICE_DISCONNECTED","TENANT_DISK_QUOTA_LIMIT_REACHED","TRUNK_CALL_LIMIT_REACHED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","UPDATE_PUSH_CERTS_FAILED","WEBHOOK_QUEUE_TOO_LARGE"],"description":"The name of the system email template.   \nCan be either:   \n- `2FA_VERIFICATION`: Authentication with two factor notification.\n- `CPU_EXCEEDED`: CPU usage exceeded threshold notification.\n- `HARD_DISK_EXCEEDED`: Hard disk usage exceeded threshold notification.\n- `IP_BLOCKED`: IP adddredd blocked notification.\n- `LICENSE_LIMIT`: License limited notification.\n- `MEMORY_EXCEEDED`: Memory usage exceeded threshold notification.\n- `RESET_PASSWORD`: Reset password notification.\n- `SERVICE_CONNECTED`: Service connected notification.\n- `SERVICE_DISCONNECTED`: Service disconnected notification.\n- `TENANT_DISK_QUOTA_LIMIT_REACHED`: Tenant disk quota limited notification.\n- `TRUNK_CALL_LIMIT_REACHED`: Trunk call limited notification.\n- `TRUNK_CONNECTED`: Trunk connected notification.\n- `TRUNK_DISCONNECTED`: Trunk disconnected notification.\n- `UPDATE_PUSH_CERTS_FAILED`: Update push certificates failed notification.\n- `WEBHOOK_QUEUE_TOO_LARGE`: Webhook queue full notification.\n"},"description":"The name of the email template."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","enum":["2FA_VERIFICATION","CPU_EXCEEDED","HARD_DISK_EXCEEDED","IP_BLOCKED","LICENSE_LIMIT","MEMORY_EXCEEDED","RESET_PASSWORD","SERVICE_CONNECTED","SERVICE_DISCONNECTED","TENANT_DISK_QUOTA_LIMIT_REACHED","TRUNK_CALL_LIMIT_REACHED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","UPDATE_PUSH_CERTS_FAILED","WEBHOOK_QUEUE_TOO_LARGE"],"description":"The name of the system email template.   \nCan be either:   \n- `2FA_VERIFICATION`: Authentication with two factor notification.\n- `CPU_EXCEEDED`: CPU usage exceeded threshold notification.\n- `HARD_DISK_EXCEEDED`: Hard disk usage exceeded threshold notification.\n- `IP_BLOCKED`: IP adddredd blocked notification.\n- `LICENSE_LIMIT`: License limited notification.\n- `MEMORY_EXCEEDED`: Memory usage exceeded threshold notification.\n- `RESET_PASSWORD`: Reset password notification.\n- `SERVICE_CONNECTED`: Service connected notification.\n- `SERVICE_DISCONNECTED`: Service disconnected notification.\n- `TENANT_DISK_QUOTA_LIMIT_REACHED`: Tenant disk quota limited notification.\n- `TRUNK_CALL_LIMIT_REACHED`: Trunk call limited notification.\n- `TRUNK_CONNECTED`: Trunk connected notification.\n- `TRUNK_DISCONNECTED`: Trunk disconnected notification.\n- `UPDATE_PUSH_CERTS_FAILED`: Update push certificates failed notification.\n- `WEBHOOK_QUEUE_TOO_LARGE`: Webhook queue full notification.\n"},"body":{"type":"string","description":"Notification email body.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"from":{"type":"string","description":"Notification email from field.\n"},"protected":{"type":"boolean","description":"Indicates whether the template is system-protected:\n- true: System default template (read-only, cannot be modified)\n- false: Custom template (editable)\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update a custom email template.

> This API updates an custom system email template.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/admin/email_templates/{name}":{"post":{"tags":["Notification"],"operationId":"saveSystemEmailTemplate","summary":"Update a custom email template.","description":"This API updates an custom system email template.\n","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["2FA_VERIFICATION","CPU_EXCEEDED","HARD_DISK_EXCEEDED","IP_BLOCKED","LICENSE_LIMIT","MEMORY_EXCEEDED","RESET_PASSWORD","SERVICE_CONNECTED","SERVICE_DISCONNECTED","TENANT_DISK_QUOTA_LIMIT_REACHED","TRUNK_CALL_LIMIT_REACHED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","UPDATE_PUSH_CERTS_FAILED","WEBHOOK_QUEUE_TOO_LARGE"],"description":"The name of the system email template.   \nCan be either:   \n- `2FA_VERIFICATION`: Authentication with two factor notification.\n- `CPU_EXCEEDED`: CPU usage exceeded threshold notification.\n- `HARD_DISK_EXCEEDED`: Hard disk usage exceeded threshold notification.\n- `IP_BLOCKED`: IP adddredd blocked notification.\n- `LICENSE_LIMIT`: License limited notification.\n- `MEMORY_EXCEEDED`: Memory usage exceeded threshold notification.\n- `RESET_PASSWORD`: Reset password notification.\n- `SERVICE_CONNECTED`: Service connected notification.\n- `SERVICE_DISCONNECTED`: Service disconnected notification.\n- `TENANT_DISK_QUOTA_LIMIT_REACHED`: Tenant disk quota limited notification.\n- `TRUNK_CALL_LIMIT_REACHED`: Trunk call limited notification.\n- `TRUNK_CONNECTED`: Trunk connected notification.\n- `TRUNK_DISCONNECTED`: Trunk disconnected notification.\n- `UPDATE_PUSH_CERTS_FAILED`: Update push certificates failed notification.\n- `WEBHOOK_QUEUE_TOO_LARGE`: Webhook queue full notification.\n"},"description":"The name of the email template."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","description":"Notification email body.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"from":{"type":"string","description":"Notification email from field.\n"}},"required":["body","subject","from"]}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Retrieve notification settings

> Retrieve details of notification settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/tenant/notification":{"get":{"tags":["Notification"],"operationId":"getNotificationSettings","summary":"Retrieve notification settings","description":"Retrieve details of notification settings.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["SMTP","MS365","GMAIL"],"description":"The email server type.   \nCan be either:   \n- `SMTP`: Use generic SMTP server.\n- `MS365` Use Microsoft 365 email service.\n- `GMAIL` Use Google Gmail service.\n"},"server":{"type":"string","description":"SMTP server used for sending mails.\n"},"port":{"type":"integer","format":"int32","minimum":0,"maximum":65535,"description":"A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535.\nFor TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port\n"},"reply_to":{"type":"string","description":"A Reply-To address is identified by inserting the Reply-To header in your email.  \nIt is the email address that the reply message is sent \nwhen you want the reply to go to an email address that is different than the From: address.\n"},"username":{"type":"string","maxLength":128,"description":"Username or email address.\n"},"auth":{"type":"string","enum":["DISABLE","AUTO","LOGIN","PLAIN"],"default":"AUTO","description":"The authentication protocols.   \nCan be either:   \n- `DISABLE`: Skip authentication mechanism.\n- `AUTO`: Use auto-selected authentication algorithms by server (Currently only supports LOGIN and PLAIN).\n- `LOGIN`: Use LOGIN authentication mechanism.\n- `PLAIN` Use PLAIN authentication mechanism.\n"},"enable_tls_ssl":{"type":"boolean","default":true,"description":"Whether to enable TLS/SSL.\n"},"enable_starttls_auto":{"type":"boolean","default":false,"description":"Whether StartTLS is automatically enabled.\n"},"recipients":{"type":"string","description":"Comma-separated list of email address that should receive notifications.   \nAllow up to 15 email addresses.\n"},"enable_system_email_server":{"type":"boolean","readOnly":true,"description":"Has ability to use system email server settings to send notifications.\n"},"notify_user_registration":{"type":"boolean","default":false,"description":"Notify via email when user registered.\n"},"notify_queue_sla_breached":{"type":"boolean","default":false,"description":"Notify queue manager via email when SLA time has been breached.\n"},"notify_queue_callback":{"type":"boolean","default":false,"description":"Notify queue manager via email when callback has been made.\n"},"notify_queue_callback_failed":{"type":"boolean","default":false,"description":"Notify queue manager via email when callback failed.\n"},"notify_queue_call_lost":{"type":"boolean","default":false,"description":"Notify queue Manager via email when call lost.\n"},"notify_emergency_call":{"type":"boolean","default":true,"description":"Send a notification email when emergency number dialed.\n"},"notify_license_limited":{"type":"boolean","default":true,"description":"Send a notification email when license limit reached.\n"},"notify_trunk_call_limited":{"type":"boolean","default":true,"description":"Send a notification email when trunk call limited reached.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update notification settings

> Update notification settings.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/tenant/notification":{"post":{"tags":["Notification"],"operationId":"updateNotificationSettings","summary":"Update notification settings","description":"Update notification settings.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["SMTP","MS365","GMAIL"],"description":"The email server type.   \nCan be either:   \n- `SMTP`: Use generic SMTP server.\n- `MS365` Use Microsoft 365 email service.\n- `GMAIL` Use Google Gmail service.\n"},"server":{"type":"string","description":"SMTP server used for sending mails.\n"},"port":{"type":"integer","format":"int32","minimum":0,"maximum":65535,"description":"A port number is a 16-bit unsigned integer, thus ranging from 0 to 65535.\nFor TCP, port number 0 is reserved and cannot be used, while for UDP, the source port is optional and a value of zero means no port\n"},"reply_to":{"type":"string","description":"A Reply-To address is identified by inserting the Reply-To header in your email.  \nIt is the email address that the reply message is sent \nwhen you want the reply to go to an email address that is different than the From: address.\n"},"username":{"type":"string","maxLength":128,"description":"Username or email address.\n"},"password":{"type":"string","description":"Password for email account.\n"},"auth":{"type":"string","enum":["DISABLE","AUTO","LOGIN","PLAIN"],"default":"AUTO","description":"The authentication protocols.   \nCan be either:   \n- `DISABLE`: Skip authentication mechanism.\n- `AUTO`: Use auto-selected authentication algorithms by server (Currently only supports LOGIN and PLAIN).\n- `LOGIN`: Use LOGIN authentication mechanism.\n- `PLAIN` Use PLAIN authentication mechanism.\n"},"enable_tls_ssl":{"type":"boolean","default":true,"description":"Whether to enable TLS/SSL.\n"},"enable_starttls_auto":{"type":"boolean","default":false,"description":"Whether StartTLS is automatically enabled.\n"},"recipients":{"type":"string","description":"Comma-separated list of email address that should receive notifications.   \nAllow up to 15 email addresses.\n"},"notify_user_registration":{"type":"boolean","default":false,"description":"Notify via email when user registered.\n"},"notify_queue_sla_breached":{"type":"boolean","default":false,"description":"Notify queue manager via email when SLA time has been breached.\n"},"notify_queue_callback":{"type":"boolean","default":false,"description":"Notify queue manager via email when callback has been made.\n"},"notify_queue_callback_failed":{"type":"boolean","default":false,"description":"Notify queue manager via email when callback failed.\n"},"notify_queue_call_lost":{"type":"boolean","default":false,"description":"Notify queue Manager via email when call lost.\n"},"notify_emergency_call":{"type":"boolean","default":true,"description":"Send a notification email when emergency number dialed.\n"},"notify_license_limited":{"type":"boolean","default":true,"description":"Send a notification email when license limit reached.\n"},"notify_trunk_call_limited":{"type":"boolean","default":true,"description":"Send a notification email when trunk call limited reached.\n"}},"required":["type","username"]}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## Test email

> Check email server configurations by sending testing email.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/tenant/notification/test_email":{"post":{"tags":["Notification"],"operationId":"testEmail","summary":"Test email","description":"Check email server configurations by sending testing email.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"recipient":{"type":"string","description":"The recipient's e-mail address.\n"},"subject":{"type":"string","description":"Mail subject.\n"},"content":{"type":"string","description":"Mail content.\n"}},"required":["recipient","subject","content"]}}},"required":true},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```

## List default email templates

> List all of default email templates<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/default_email_templates":{"get":{"tags":["Notification"],"operationId":"listDefaultEmailTemplates","summary":"List default email templates","description":"List all of default email templates\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["AUTH_RESET_PASSWORD","AUTH_SIGN_IN_2FA","CALL_REPORT_COMPLETED","CONFERENCE_INVITATION","DISK_LOW","EMERGENCY_CALL","LICENSE_LIMITED","QUEUE_CALLBACK","QUEUE_CALLBACK_FAILED","QUEUE_CALL_LOST","QUEUE_SLA","RECHARGE","SHARED_VOICEMAIL_RECEIVED","TRUNK_CALL_LIMITED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","USER_CREATION","VOICEMAIL_RECEIVED"],"description":"Name of the email template:   \nCan be either:   \n- `AUTH_RESET_PASSWORD`: reset user password notification.\n- `AUTH_SIGN_IN_2FA`: two factor authentication code notification.\n- `CALL_REPORT_COMPLETED`: call report completed notification.\n- `CONFERENCE_INVITATION`: meeting invitation notification.\n- `DISK_LOW`: low disk notification.\n- `EMERGENCY_CALL`: emergency call notification.\n- `LICENSE_LIMITED`: license limited notification.\n- `QUEUE_CALLBACK`: call queue callback notification.\n- `QUEUE_CALLBACK_FAILED`: call queue callback failed notification.\n- `QUEUE_CALL_LOST`: call queue call lost notification.\n- `QUEUE_SLA`: call queue sla time reached notification.\n- `RECHARGE`: recharge notification.\n- `SHARED_VOICEMAIL_RECEIVED`: shared voicemail received notification.\n- `TRUNK_CALL_LIMITED`: trunk call limited notification.\n- `TRUNK_CONNECTED`: trunk connected notification.\n- `TRUNK_DISCONNECTED`: trunk disconnected notification.\n- `USER_CREATION`: user creation notification.\n- `VOICEMAIL_RECEIVED`: received voicemail notification.\n"},"from":{"type":"string","description":"Notification email from field.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"body":{"type":"string","description":"Notification email body.\n"}}},"description":"A collection of default email templates.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve default details of template

> Get details of default template by name.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/default_email_templates/{name}":{"get":{"tags":["Notification"],"operationId":"getDefaultEmailTemplateDetails","summary":"Retrieve default details of template","description":"Get details of default template by name.\n","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["AUTH_RESET_PASSWORD","AUTH_SIGN_IN_2FA","CALL_REPORT_COMPLETED","CONFERENCE_INVITATION","DISK_LOW","EMERGENCY_CALL","LICENSE_LIMITED","QUEUE_CALLBACK","QUEUE_CALLBACK_FAILED","QUEUE_CALL_LOST","QUEUE_SLA","RECHARGE","SHARED_VOICEMAIL_RECEIVED","TRUNK_CALL_LIMITED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","USER_CREATION","VOICEMAIL_RECEIVED"],"description":"Name of the email template:   \nCan be either:   \n- `AUTH_RESET_PASSWORD`: reset user password notification.\n- `AUTH_SIGN_IN_2FA`: two factor authentication code notification.\n- `CALL_REPORT_COMPLETED`: call report completed notification.\n- `CONFERENCE_INVITATION`: meeting invitation notification.\n- `DISK_LOW`: low disk notification.\n- `EMERGENCY_CALL`: emergency call notification.\n- `LICENSE_LIMITED`: license limited notification.\n- `QUEUE_CALLBACK`: call queue callback notification.\n- `QUEUE_CALLBACK_FAILED`: call queue callback failed notification.\n- `QUEUE_CALL_LOST`: call queue call lost notification.\n- `QUEUE_SLA`: call queue sla time reached notification.\n- `RECHARGE`: recharge notification.\n- `SHARED_VOICEMAIL_RECEIVED`: shared voicemail received notification.\n- `TRUNK_CALL_LIMITED`: trunk call limited notification.\n- `TRUNK_CONNECTED`: trunk connected notification.\n- `TRUNK_DISCONNECTED`: trunk disconnected notification.\n- `USER_CREATION`: user creation notification.\n- `VOICEMAIL_RECEIVED`: received voicemail notification.\n"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","enum":["AUTH_RESET_PASSWORD","AUTH_SIGN_IN_2FA","CALL_REPORT_COMPLETED","CONFERENCE_INVITATION","DISK_LOW","EMERGENCY_CALL","LICENSE_LIMITED","QUEUE_CALLBACK","QUEUE_CALLBACK_FAILED","QUEUE_CALL_LOST","QUEUE_SLA","RECHARGE","SHARED_VOICEMAIL_RECEIVED","TRUNK_CALL_LIMITED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","USER_CREATION","VOICEMAIL_RECEIVED"],"description":"Name of the email template:   \nCan be either:   \n- `AUTH_RESET_PASSWORD`: reset user password notification.\n- `AUTH_SIGN_IN_2FA`: two factor authentication code notification.\n- `CALL_REPORT_COMPLETED`: call report completed notification.\n- `CONFERENCE_INVITATION`: meeting invitation notification.\n- `DISK_LOW`: low disk notification.\n- `EMERGENCY_CALL`: emergency call notification.\n- `LICENSE_LIMITED`: license limited notification.\n- `QUEUE_CALLBACK`: call queue callback notification.\n- `QUEUE_CALLBACK_FAILED`: call queue callback failed notification.\n- `QUEUE_CALL_LOST`: call queue call lost notification.\n- `QUEUE_SLA`: call queue sla time reached notification.\n- `RECHARGE`: recharge notification.\n- `SHARED_VOICEMAIL_RECEIVED`: shared voicemail received notification.\n- `TRUNK_CALL_LIMITED`: trunk call limited notification.\n- `TRUNK_CONNECTED`: trunk connected notification.\n- `TRUNK_DISCONNECTED`: trunk disconnected notification.\n- `USER_CREATION`: user creation notification.\n- `VOICEMAIL_RECEIVED`: received voicemail notification.\n"},"from":{"type":"string","description":"Notification email from field.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"body":{"type":"string","description":"Notification email body.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## List custom email templates

> List all of custom email templates<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/custom_email_templates":{"get":{"tags":["Notification"],"operationId":"listCustomEmailTemplates","summary":"List custom email templates","description":"List all of custom email templates\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["AUTH_RESET_PASSWORD","AUTH_SIGN_IN_2FA","CALL_REPORT_COMPLETED","CONFERENCE_INVITATION","DISK_LOW","EMERGENCY_CALL","LICENSE_LIMITED","QUEUE_CALLBACK","QUEUE_CALLBACK_FAILED","QUEUE_CALL_LOST","QUEUE_SLA","RECHARGE","SHARED_VOICEMAIL_RECEIVED","TRUNK_CALL_LIMITED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","USER_CREATION","VOICEMAIL_RECEIVED"],"description":"Name of the email template:   \nCan be either:   \n- `AUTH_RESET_PASSWORD`: reset user password notification.\n- `AUTH_SIGN_IN_2FA`: two factor authentication code notification.\n- `CALL_REPORT_COMPLETED`: call report completed notification.\n- `CONFERENCE_INVITATION`: meeting invitation notification.\n- `DISK_LOW`: low disk notification.\n- `EMERGENCY_CALL`: emergency call notification.\n- `LICENSE_LIMITED`: license limited notification.\n- `QUEUE_CALLBACK`: call queue callback notification.\n- `QUEUE_CALLBACK_FAILED`: call queue callback failed notification.\n- `QUEUE_CALL_LOST`: call queue call lost notification.\n- `QUEUE_SLA`: call queue sla time reached notification.\n- `RECHARGE`: recharge notification.\n- `SHARED_VOICEMAIL_RECEIVED`: shared voicemail received notification.\n- `TRUNK_CALL_LIMITED`: trunk call limited notification.\n- `TRUNK_CONNECTED`: trunk connected notification.\n- `TRUNK_DISCONNECTED`: trunk disconnected notification.\n- `USER_CREATION`: user creation notification.\n- `VOICEMAIL_RECEIVED`: received voicemail notification.\n"},"from":{"type":"string","description":"Notification email from field.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"body":{"type":"string","description":"Notification email body.\n"}}},"description":"A collection of custom email templates.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Add custom email template

> Create custom email template.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/custom_email_templates":{"post":{"tags":["Notification"],"operationId":"createCustomEmailTemplate","summary":"Add custom email template","description":"Create custom email template.\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","enum":["AUTH_RESET_PASSWORD","AUTH_SIGN_IN_2FA","CALL_REPORT_COMPLETED","CONFERENCE_INVITATION","DISK_LOW","EMERGENCY_CALL","LICENSE_LIMITED","QUEUE_CALLBACK","QUEUE_CALLBACK_FAILED","QUEUE_CALL_LOST","QUEUE_SLA","RECHARGE","SHARED_VOICEMAIL_RECEIVED","TRUNK_CALL_LIMITED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","USER_CREATION","VOICEMAIL_RECEIVED"],"description":"Name of the email template:   \nCan be either:   \n- `AUTH_RESET_PASSWORD`: reset user password notification.\n- `AUTH_SIGN_IN_2FA`: two factor authentication code notification.\n- `CALL_REPORT_COMPLETED`: call report completed notification.\n- `CONFERENCE_INVITATION`: meeting invitation notification.\n- `DISK_LOW`: low disk notification.\n- `EMERGENCY_CALL`: emergency call notification.\n- `LICENSE_LIMITED`: license limited notification.\n- `QUEUE_CALLBACK`: call queue callback notification.\n- `QUEUE_CALLBACK_FAILED`: call queue callback failed notification.\n- `QUEUE_CALL_LOST`: call queue call lost notification.\n- `QUEUE_SLA`: call queue sla time reached notification.\n- `RECHARGE`: recharge notification.\n- `SHARED_VOICEMAIL_RECEIVED`: shared voicemail received notification.\n- `TRUNK_CALL_LIMITED`: trunk call limited notification.\n- `TRUNK_CONNECTED`: trunk connected notification.\n- `TRUNK_DISCONNECTED`: trunk disconnected notification.\n- `USER_CREATION`: user creation notification.\n- `VOICEMAIL_RECEIVED`: received voicemail notification.\n"},"from":{"type":"string","description":"Notification email from field.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"body":{"type":"string","description":"Notification email body.\n"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Retrieve custom details of template

> Get details of custom template by name.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/custom_email_templates/{name}":{"get":{"tags":["Notification"],"operationId":"getCustomEmailTemplateDetails","summary":"Retrieve custom details of template","description":"Get details of custom template by name.\n","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["AUTH_RESET_PASSWORD","AUTH_SIGN_IN_2FA","CALL_REPORT_COMPLETED","CONFERENCE_INVITATION","DISK_LOW","EMERGENCY_CALL","LICENSE_LIMITED","QUEUE_CALLBACK","QUEUE_CALLBACK_FAILED","QUEUE_CALL_LOST","QUEUE_SLA","RECHARGE","SHARED_VOICEMAIL_RECEIVED","TRUNK_CALL_LIMITED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","USER_CREATION","VOICEMAIL_RECEIVED"],"description":"Name of the email template:   \nCan be either:   \n- `AUTH_RESET_PASSWORD`: reset user password notification.\n- `AUTH_SIGN_IN_2FA`: two factor authentication code notification.\n- `CALL_REPORT_COMPLETED`: call report completed notification.\n- `CONFERENCE_INVITATION`: meeting invitation notification.\n- `DISK_LOW`: low disk notification.\n- `EMERGENCY_CALL`: emergency call notification.\n- `LICENSE_LIMITED`: license limited notification.\n- `QUEUE_CALLBACK`: call queue callback notification.\n- `QUEUE_CALLBACK_FAILED`: call queue callback failed notification.\n- `QUEUE_CALL_LOST`: call queue call lost notification.\n- `QUEUE_SLA`: call queue sla time reached notification.\n- `RECHARGE`: recharge notification.\n- `SHARED_VOICEMAIL_RECEIVED`: shared voicemail received notification.\n- `TRUNK_CALL_LIMITED`: trunk call limited notification.\n- `TRUNK_CONNECTED`: trunk connected notification.\n- `TRUNK_DISCONNECTED`: trunk disconnected notification.\n- `USER_CREATION`: user creation notification.\n- `VOICEMAIL_RECEIVED`: received voicemail notification.\n"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","enum":["AUTH_RESET_PASSWORD","AUTH_SIGN_IN_2FA","CALL_REPORT_COMPLETED","CONFERENCE_INVITATION","DISK_LOW","EMERGENCY_CALL","LICENSE_LIMITED","QUEUE_CALLBACK","QUEUE_CALLBACK_FAILED","QUEUE_CALL_LOST","QUEUE_SLA","RECHARGE","SHARED_VOICEMAIL_RECEIVED","TRUNK_CALL_LIMITED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","USER_CREATION","VOICEMAIL_RECEIVED"],"description":"Name of the email template:   \nCan be either:   \n- `AUTH_RESET_PASSWORD`: reset user password notification.\n- `AUTH_SIGN_IN_2FA`: two factor authentication code notification.\n- `CALL_REPORT_COMPLETED`: call report completed notification.\n- `CONFERENCE_INVITATION`: meeting invitation notification.\n- `DISK_LOW`: low disk notification.\n- `EMERGENCY_CALL`: emergency call notification.\n- `LICENSE_LIMITED`: license limited notification.\n- `QUEUE_CALLBACK`: call queue callback notification.\n- `QUEUE_CALLBACK_FAILED`: call queue callback failed notification.\n- `QUEUE_CALL_LOST`: call queue call lost notification.\n- `QUEUE_SLA`: call queue sla time reached notification.\n- `RECHARGE`: recharge notification.\n- `SHARED_VOICEMAIL_RECEIVED`: shared voicemail received notification.\n- `TRUNK_CALL_LIMITED`: trunk call limited notification.\n- `TRUNK_CONNECTED`: trunk connected notification.\n- `TRUNK_DISCONNECTED`: trunk disconnected notification.\n- `USER_CREATION`: user creation notification.\n- `VOICEMAIL_RECEIVED`: received voicemail notification.\n"},"from":{"type":"string","description":"Notification email from field.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"body":{"type":"string","description":"Notification email body.\n"}}}}}},"4XX":{"description":"Error"}}}}}}
```

## Update custom email template

> Update custom email template.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.6"},"tags":[{"name":"Notification","description":"Manage notification functions.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/custom_email_templates/{name}":{"post":{"tags":["Notification"],"operationId":"updateCustomEmailTemplate","summary":"Update custom email template","description":"Update custom email template.\n","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["AUTH_RESET_PASSWORD","AUTH_SIGN_IN_2FA","CALL_REPORT_COMPLETED","CONFERENCE_INVITATION","DISK_LOW","EMERGENCY_CALL","LICENSE_LIMITED","QUEUE_CALLBACK","QUEUE_CALLBACK_FAILED","QUEUE_CALL_LOST","QUEUE_SLA","RECHARGE","SHARED_VOICEMAIL_RECEIVED","TRUNK_CALL_LIMITED","TRUNK_CONNECTED","TRUNK_DISCONNECTED","USER_CREATION","VOICEMAIL_RECEIVED"],"description":"Name of the email template:   \nCan be either:   \n- `AUTH_RESET_PASSWORD`: reset user password notification.\n- `AUTH_SIGN_IN_2FA`: two factor authentication code notification.\n- `CALL_REPORT_COMPLETED`: call report completed notification.\n- `CONFERENCE_INVITATION`: meeting invitation notification.\n- `DISK_LOW`: low disk notification.\n- `EMERGENCY_CALL`: emergency call notification.\n- `LICENSE_LIMITED`: license limited notification.\n- `QUEUE_CALLBACK`: call queue callback notification.\n- `QUEUE_CALLBACK_FAILED`: call queue callback failed notification.\n- `QUEUE_CALL_LOST`: call queue call lost notification.\n- `QUEUE_SLA`: call queue sla time reached notification.\n- `RECHARGE`: recharge notification.\n- `SHARED_VOICEMAIL_RECEIVED`: shared voicemail received notification.\n- `TRUNK_CALL_LIMITED`: trunk call limited notification.\n- `TRUNK_CONNECTED`: trunk connected notification.\n- `TRUNK_DISCONNECTED`: trunk disconnected notification.\n- `USER_CREATION`: user creation notification.\n- `VOICEMAIL_RECEIVED`: received voicemail notification.\n"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"Notification email from field.\n"},"subject":{"type":"string","description":"Notification email subject field.\n"},"body":{"type":"string","description":"Notification email body.\n"}}}}}},"responses":{"200":{"description":"OK"},"4XX":{"description":"Error"}}}}}}
```
