Skip to main content

Email templates v1 API

Download OpenAPI (YAML)Version v1

Base URL: https://localhost:9443/t/carbon.super/api/server/v1

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

NameInTypeRequiredDescription
limitqueryinteger (int32)

Maximum number of records to return. This option is not yet supported.

offsetqueryinteger (int32)

Number of records to skip for pagination. This option is not yet supported.

sortOrderquerystring

Define the order in which the retrieved records should be sorted. This option is not yet supported.

Allowed values: asc, desc

sortByquerystring

Attribute by which the retrieved records should be sorted. This option is not yet supported.

requiredAttributesquerystring

Specifies the required parameters in the response.

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
displayNamestringYes

Display name of the email template type.

templatesarray of EmailTemplateWithIDYes

Email templates for the template type.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
template-type-idpathstringYes

Email Template Type ID

limitqueryinteger (int32)

Maximum number of records to return. This option is not yet supported.

offsetqueryinteger (int32)

Number of records to skip for pagination. This option is not yet supported.

sortOrderquerystring

Define the order in which the retrieved records should be sorted. This option is not yet supported.

Allowed values: asc, desc

sortByquerystring

Attribute by which the retrieved records should be sorted. This option is not yet supported.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
template-type-idpathstringYes

Email Template Type ID

Request body: application/json

Email templates for the template type

Schema: array of EmailTemplateWithID

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
template-type-idpathstringYes

Email Template Type ID

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
template-type-idpathstringYes

Email Template Type ID

Request body: application/json

Email template to be added.

Schema: EmailTemplateWithID

5 properties
NameTypeRequiredDescription
contentTypestringYes

Content type of the email template.

subjectstringYes

The subject of the email.

bodystringYes

The body of the email.

footerstringYes

The footer of the email.

idstringYes

Unique ID of the email template. This ID represents the locale of the email template.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
template-type-idpathstringYes

Email Template Type ID

limitqueryinteger (int32)

Maximum number of records to return. This option is not yet supported.

offsetqueryinteger (int32)

Number of records to skip for pagination. This option is not yet supported.

sortOrderquerystring

Define the order in which the retrieved records should be sorted. This option is not yet supported.

Allowed values: asc, desc

sortByquerystring

Attribute by which the retrieved records should be sorted. This option is not yet supported.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
template-type-idpathstringYes

Email Template Type ID

template-idpathstringYes

Email template ID. This should be a valid locale.

limitqueryinteger (int32)

Maximum number of records to return. This option is not yet supported.

offsetqueryinteger (int32)

Number of records to skip for pagination. This option is not yet supported.

sortOrderquerystring

Define the order in which the retrieved records should be sorted. This option is not yet supported.

Allowed values: asc, desc

sortByquerystring

Attribute by which the retrieved records should be sorted. This option is not yet supported.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
template-type-idpathstringYes

Email Template Type ID

template-idpathstringYes

Email template ID. This should be a valid locale.

Request body: application/json

Email templates for the template type

Schema: EmailTemplateWithID

5 properties
NameTypeRequiredDescription
contentTypestringYes

Content type of the email template.

subjectstringYes

The subject of the email.

bodystringYes

The body of the email.

footerstringYes

The footer of the email.

idstringYes

Unique ID of the email template. This ID represents the locale of the email template.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
template-type-idpathstringYes

Email Template Type ID

template-idpathstringYes

Email template ID. This should be a valid locale.

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
idstringYes

Unique ID of the email template type.

displayNamestringYes

Display name of the email template type.

templatesarray of EmailTemplateWithID

Email templates for the template type.

selfstringYes

Location of the created/updated resource.

EmailTemplateType​

Type: object

2 properties
NameTypeRequiredDescription
displayNamestringYes

Display name of the email template type.

templatesarray of EmailTemplateWithIDYes

Email templates for the template type.

EmailTemplateTypeWithID​

Type: EmailTemplateType

3 properties
NameTypeRequiredDescription
displayNamestringYes

Display name of the email template type.

templatesarray of EmailTemplateWithIDYes

Email templates for the template type.

idstringYes

Unique ID of the email template type.

EmailTemplate​

Type: object

4 properties
NameTypeRequiredDescription
contentTypestringYes

Content type of the email template.

subjectstringYes

The subject of the email.

bodystringYes

The body of the email.

footerstringYes

The footer of the email.

EmailTemplateWithID​

Type: EmailTemplate

5 properties
NameTypeRequiredDescription
contentTypestringYes

Content type of the email template.

subjectstringYes

The subject of the email.

bodystringYes

The body of the email.

footerstringYes

The footer of the email.

idstringYes

Unique ID of the email template. This ID represents the locale of the email template.

SimpleEmailTemplate​

Type: object

2 properties
NameTypeRequiredDescription
idstringYes

Unique ID of the email template. This ID represents the locale of the email template.

selfstringYes

Location of the created/updated resource.

Error​

Type: object

4 properties
NameTypeRequiredDescription
codestringYes
messagestringYes
descriptionstring
traceIdstring

Was this page helpful?