Email templates v1 API
The Email Template API (version v1).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
OAuth2: oauth2
authorizationCode flow, token URL https://localhost:9443/oauth2/token, authorization URL https://localhost:9443/oauth2/authorize
Email Template Types
An email template type can have multiple email templates for different languages.
Retrieves all the email template types
GET /email/template-types
Retrieves all the email template types in the system, with limited details of the email templates.
Scope(Permission) required: internal_email_mgt_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer (int32) | Maximum number of records to return. This option is not yet supported. | |
offset | query | integer (int32) | Number of records to skip for pagination. This option is not yet supported. | |
sortOrder | query | string | Define the order in which the retrieved records should be sorted. This option is not yet supported. Allowed values: | |
sortBy | query | string | Attribute by which the retrieved records should be sorted. This option is not yet supported. | |
requiredAttributes | query | string | Specifies the required parameters in the response. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Search results matching the given criteria. | array of EmailTemplateTypeWithoutTemplates |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
500 | Internal Server Error | Error |
Adds a new email template type
POST /email/template-types
Adds a new email template type to the system. An email template type can have any number of email templates.
- Attribute displayName of the template type should be unique.
Scope(Permission) required: internal_email_mgt_create
Request body: application/json
Email template type to be added.
Schema: EmailTemplateType
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | Display name of the email template type. |
templates | array of EmailTemplateWithID | Yes | Email templates for the template type. |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Item Created | EmailTemplateTypeWithoutTemplates |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
409 | Item Already Exists | Error |
500 | Internal Server Error | Error |
Retrieves the email template type corresponding to the template type id
GET /email/template-types/{template-type-id}
Retrieves the email template type in the system identified by the template-type-id.
Scope(Permission) required: internal_email_mgt_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template-type-id | path | string | Yes | Email Template Type ID |
limit | query | integer (int32) | Maximum number of records to return. This option is not yet supported. | |
offset | query | integer (int32) | Number of records to skip for pagination. This option is not yet supported. | |
sortOrder | query | string | Define the order in which the retrieved records should be sorted. This option is not yet supported. Allowed values: | |
sortBy | query | string | Attribute by which the retrieved records should be sorted. This option is not yet supported. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Search results matching the given criteria. | EmailTemplateTypeWithID |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Replace all email templates of the respective email template type
PUT /email/template-types/{template-type-id}
Replace all email templates of the respective email template type with the newly provided email templates.
Scope(Permission) required: internal_email_mgt_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template-type-id | path | string | Yes | Email Template Type ID |
Request body: application/json
Email templates for the template type
Schema: array of EmailTemplateWithID
Responses
| Code | Description | Schema |
|---|---|---|
200 | Item Updated | |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Removes an email template type
DEL /email/template-types/{template-type-id}
Removes an existing email template type with all its email templates
from the system.
Scope(Permission) required:internal_email_mgt_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template-type-id | path | string | Yes | Email Template Type ID |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Item Deleted | |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Email Templates
An email template of a specific type and language.
Adds a new email template to an existing email template type
POST /email/template-types/{template-type-id}
Another email template with the same locale should not already exist in the
respective email template type.
Scope(Permission) required: internal_email_mgt_create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template-type-id | path | string | Yes | Email Template Type ID |
Request body: application/json
Email template to be added.
Schema: EmailTemplateWithID
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
contentType | string | Yes | Content type of the email template. |
subject | string | Yes | The subject of the email. |
body | string | Yes | The body of the email. |
footer | string | Yes | The footer of the email. |
id | string | Yes | Unique ID of the email template. This ID represents the locale of the email template. |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Item Created | SimpleEmailTemplate |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
409 | Item Already Exists | Error |
500 | Internal Server Error | Error |
Retrieves the list of email templates in the template type id
GET /email/template-types/{template-type-id}/templates
Retrieves the list of email templates in the template type ID.
Scope(Permission) required:internal_email_mgt_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template-type-id | path | string | Yes | Email Template Type ID |
limit | query | integer (int32) | Maximum number of records to return. This option is not yet supported. | |
offset | query | integer (int32) | Number of records to skip for pagination. This option is not yet supported. | |
sortOrder | query | string | Define the order in which the retrieved records should be sorted. This option is not yet supported. Allowed values: | |
sortBy | query | string | Attribute by which the retrieved records should be sorted. This option is not yet supported. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Search results matching the given criteria. | array of SimpleEmailTemplate |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Retrieves a single email template
GET /email/template-types/{template-type-id}/templates/{template-id}
Retrieves the email template that matches the template-type-id and the template-id.
Scope(Permission) required:internal_email_mgt_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template-type-id | path | string | Yes | Email Template Type ID |
template-id | path | string | Yes | Email template ID. This should be a valid locale. |
limit | query | integer (int32) | Maximum number of records to return. This option is not yet supported. | |
offset | query | integer (int32) | Number of records to skip for pagination. This option is not yet supported. | |
sortOrder | query | string | Define the order in which the retrieved records should be sorted. This option is not yet supported. Allowed values: | |
sortBy | query | string | Attribute by which the retrieved records should be sorted. This option is not yet supported. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Search results matching the given criteria. | EmailTemplateWithID |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Replaces an existing email template
PUT /email/template-types/{template-type-id}/templates/{template-id}
Replace the email template identified by the template-type-id and the template-id.
Scope(Permission) required:internal_email_mgt_update
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template-type-id | path | string | Yes | Email Template Type ID |
template-id | path | string | Yes | Email template ID. This should be a valid locale. |
Request body: application/json
Email templates for the template type
Schema: EmailTemplateWithID
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
contentType | string | Yes | Content type of the email template. |
subject | string | Yes | The subject of the email. |
body | string | Yes | The body of the email. |
footer | string | Yes | The footer of the email. |
id | string | Yes | Unique ID of the email template. This ID represents the locale of the email template. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Item Updated | |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Removes an email template
DEL /email/template-types/{template-type-id}/templates/{template-id}
Removes an email template identified by the template-type-id and the template-id.
Scope(Permission) required:internal_email_mgt_delete
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
template-type-id | path | string | Yes | Email Template Type ID |
template-id | path | string | Yes | Email template ID. This should be a valid locale. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Item Deleted | |
400 | Invalid input request | Error |
401 | Unauthorized | |
403 | Forbidden | |
404 | The specified resource is not found | Error |
500 | Internal Server Error | Error |
Schemas
EmailTemplateTypeWithoutTemplates
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique ID of the email template type. |
displayName | string | Yes | Display name of the email template type. |
templates | array of EmailTemplateWithID | Email templates for the template type. | |
self | string | Yes | Location of the created/updated resource. |
EmailTemplateType
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | Display name of the email template type. |
templates | array of EmailTemplateWithID | Yes | Email templates for the template type. |
EmailTemplateTypeWithID
Type: EmailTemplateType
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | Display name of the email template type. |
templates | array of EmailTemplateWithID | Yes | Email templates for the template type. |
id | string | Yes | Unique ID of the email template type. |
EmailTemplate
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
contentType | string | Yes | Content type of the email template. |
subject | string | Yes | The subject of the email. |
body | string | Yes | The body of the email. |
footer | string | Yes | The footer of the email. |
EmailTemplateWithID
Type: EmailTemplate
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
contentType | string | Yes | Content type of the email template. |
subject | string | Yes | The subject of the email. |
body | string | Yes | The body of the email. |
footer | string | Yes | The footer of the email. |
id | string | Yes | Unique ID of the email template. This ID represents the locale of the email template. |
SimpleEmailTemplate
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique ID of the email template. This ID represents the locale of the email template. |
self | string | Yes | Location of the created/updated resource. |
Error
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | |
message | string | Yes | |
description | string | ||
traceId | string |
Was this page helpful?