diff --git a/en/asgardeo/__pycache__/hooks.cpython-312.pyc b/en/asgardeo/__pycache__/hooks.cpython-312.pyc
new file mode 100644
index 0000000000..b4edf4c469
Binary files /dev/null and b/en/asgardeo/__pycache__/hooks.cpython-312.pyc differ
diff --git a/en/asgardeo/docs/apis/notification-templates.md b/en/asgardeo/docs/apis/notification-templates.md
new file mode 100644
index 0000000000..bf6a050f97
--- /dev/null
+++ b/en/asgardeo/docs/apis/notification-templates.md
@@ -0,0 +1,5 @@
+---
+template: templates/redoc.html
+---
+
+
diff --git a/en/asgardeo/docs/apis/restapis/notification-templates.yml b/en/asgardeo/docs/apis/restapis/notification-templates.yml
new file mode 100644
index 0000000000..4b5f670172
--- /dev/null
+++ b/en/asgardeo/docs/apis/restapis/notification-templates.yml
@@ -0,0 +1,1310 @@
+openapi: 3.0.0
+info:
+ title: "Asgardeo - Notification Templates API"
+ version: 1.0.0
+ description: >-
+ This is the RESTful API for managing notification templates in the WSO2 Identity
+ Server. This API allows adding, retrieving, replacing, and removing notification
+ templates and template types.
+tags:
+ - name: Email Template Types
+ description: An email template type can have multiple email templates for different languages.
+ - name: Email Templates
+ description: An email template of a specific type and a language.
+ - name: Application Email Templates
+ description: An application email template of a specific type and a language.
+ - name: SMS Template Types
+ description: A SMS template type can have multiple SMS templates for different languages.
+ - name: SMS Templates
+ description: A SMS template of a specific type and a language.
+ - name: Application SMS Templates
+ description: An application email template of a specific type and a language.
+ - name: System Templates
+ description: A system default template of a specific type and a language.
+security:
+ - OAuth2: []
+ - BasicAuth: []
+paths:
+ /notification/email/template-types:
+ get:
+ tags:
+ - Email Template Types
+ summary: Retrieves all the email template types.
+ operationId: getAllEmailTemplateTypes
+ description: |
+ Retrieves all the email template types in the system.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - Email Template Types
+ summary: Adds a new email template type.
+ operationId: addEmailTemplateType
+ description: |
+ Adds a new email template type to the system. An email template type can have any number of
+ organization or application email templates.
+
+ * Attribute _**displayName**_ of the template type should be unique.
+
+ Scope(Permission) required: `internal_email_mgt_create` / `internal_template_mgt_update`
+
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TemplateTypeOverview'
+ description: Email template type to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ self:
+ description: Location of the newly created email template type.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}':
+ get:
+ tags:
+ - Email Template Types
+ summary: Retrieves the email template type corresponding to the template type id.
+ operationId: getEmailTemplateType
+ description: |
+ Retrieves the email template type in the system identified by the template-type-id.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - Email Template Types
+ summary: Removes an email template type.
+ operationId: deleteEmailTemplateType
+ description: |
+ Removes an existing email template type with all its email templates
+ from the system.
+ *Note : System resources are not eligible for deletion. Attempting to delete a system resource will result in a 403 Forbidden error.*
+
+ Scope(Permission) required: `internal_email_mgt_delete` / `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/reset-template-type':
+ post:
+ tags:
+ - Functions
+ summary: Resets an template type.
+ operationId: resetTemplateType
+ description: |
+ Resets an existing template type by deleting all its **user defined** templates
+ from the system.
+
+ Scope(Permission) required: `internal_template_mgt_delete`
+
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SimpleTemplateTypeID'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/org-templates':
+ get:
+ tags:
+ - Email Templates
+ summary: Retrieves the list of organization email templates under the provided template type.
+ operationId: getAllOrgTemplatesOfEmailTemplateType
+ description: |
+ Retrieves the list of organization email templates under the provided template type.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - Email Templates
+ summary: Adds a new organization email template to an existing email template type.
+ operationId: addOrgEmailTemplate
+ description: |
+ Another organization email template with the same locale should not already exist in the
+ respective email template type.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ description: Email template to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ Location:
+ description: Location of the newly created email template.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/app-templates/{app-uuid}':
+ get:
+ tags:
+ - Application Email Templates
+ summary: Retrieves the list of application email templates under the provided template type.
+ operationId: getAllAppTemplatesOfEmailTemplateType
+ description: |
+ Retrieves the list of application email templates under the provided template type.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - Application Email Templates
+ summary: Adds a new application email template to an existing email template type.
+ operationId: addAppEmailTemplate
+ description: |
+ Another application email template with the same locale should not already exist in the
+ respective email template type.
+
+ Scope(Permission) required: `internal_email_mgt_create` / `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ description: Email template to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ Location:
+ description: Location of the newly created email template.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/org-templates/{locale}':
+ get:
+ tags:
+ - Email Templates
+ summary: Retrieves a single organization email template.
+ operationId: getOrgEmailTemplate
+ description: |
+ Retrieves the organization email template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ put:
+ tags:
+ - Email Templates
+ summary: Replaces an existing organization email template.
+ operationId: updateOrgEmailTemplate
+ description: |
+ Replaces the organization email template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_update` / `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailTemplate'
+ description: Updated email template for the template type.
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - Email Templates
+ summary: Removes an organization email template.
+ operationId: deleteOrgEmailTemplate
+ description: |
+ Removes an organization email template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_delete` / `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/system-templates':
+ get:
+ tags:
+ - System Templates
+ summary: Retrieves the system email templates of template type.
+ operationId: getAllSystemTemplatesOfEmailTemplateType
+ description: |
+ Retrieves the list of system default email templates under the provided template type.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/system-templates/{locale}':
+ get:
+ tags:
+ - System Templates
+ summary: Retrieves the default email template for given type and locale.
+ operationId: getSystemEmailTemplate
+ description: |
+ Retrieves the system default email template that matches the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/app-templates/{app-uuid}/{locale}':
+ get:
+ tags:
+ - Application Email Templates
+ summary: Retrieves a single email template of application.
+ operationId: getAppEmailTemplate
+ description: |
+ Retrieves the application email template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ put:
+ tags:
+ - Application Email Templates
+ summary: Replaces an existing application email template.
+ operationId: updateAppEmailTemplate
+ description: |
+ Replaces the application email template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_update` / `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailTemplate'
+ description: Email templates for the template type.
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - Application Email Templates
+ summary: Removes an application email template.
+ operationId: deleteAppEmailTemplate
+ description: |
+ Removes an application email template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_delete` / `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ /notification/sms/template-types:
+ get:
+ tags:
+ - SMS Template Types
+ summary: Retrieves all the SMS template types.
+ operationId: getAllSMSTemplateTypes
+ description: |
+ Retrieves all the SMS template types in the system.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - SMS Template Types
+ summary: Adds a new SMS template type.
+ operationId: addSMSTemplateType
+ description: |
+ Adds a new SMS template type to the system. A SMS template type can have any number of
+ organization or application SMS templates.
+
+ * Attribute _**displayName**_ of the template type should be unique.
+
+ Scope(Permission) required: `internal_template_mgt_create`
+
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TemplateTypeOverview'
+ description: SMS template type to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ self:
+ description: Location of the newly created SMS template type.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}':
+ get:
+ tags:
+ - SMS Template Types
+ summary: Retrieves the SMS template type corresponding to the template type id.
+ operationId: getSMSTemplateType
+ description: |
+ Retrieves the SMS template type in the system identified by the template-type-id.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - SMS Template Types
+ summary: Removes a SMS template type.
+ operationId: deleteSMSTemplateType
+ description: |
+ Removes an existing SMS template type with all its SMS templates
+ from the system.
+ *Note : System resources are not eligible for deletion. Attempting to delete a system resource will result in a 403 Forbidden error.*
+
+ Scope(Permission) required: `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/app-templates/{app-uuid}':
+ get:
+ tags:
+ - Application SMS Templates
+ summary: Retrieves the list of application SMS templates under the provided template type.
+ operationId: getAllAppTemplatesOfSMSTemplateType
+ description: |
+ Retrieves the list of application SMS templates under the provided template type.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - Application SMS Templates
+ summary: Adds a new application SMS template to an existing SMS template type.
+ operationId: addAppSMSTemplate
+ description: |
+ Another application SMS template with the same locale should not already exist in the
+ respective SMS template type.
+
+ Scope(Permission) required: `internal_template_mgt_create`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ description: SMS template to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ Location:
+ description: Location of the newly created SMS template.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/app-templates/{app-uuid}/{locale}':
+ get:
+ tags:
+ - Application SMS Templates
+ summary: Retrieves a single SMS template of application.
+ operationId: getAppSMSTemplate
+ description: |
+ Retrieves the application SMS template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ put:
+ tags:
+ - Application SMS Templates
+ summary: Replaces an existing application SMS template.
+ operationId: updateAppSMSTemplate
+ description: |
+ Replaces the application SMS template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SMSTemplate'
+ description: Application SMS template for the template type and locale.
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - Application SMS Templates
+ summary: Removes a SMS template.
+ operationId: deleteAppSMSTemplate
+ description: |
+ Removes a SMS template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/org-templates':
+ get:
+ tags:
+ - SMS Templates
+ summary: Retrieves the list of organization SMS templates under the provided template type.
+ operationId: getAllOrgTemplatesOfSMSTemplateType
+ description: |
+ Retrieves the list of organization SMS templates under the provided templalte type.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - SMS Templates
+ summary: Adds a new organization SMS template to an existing SMS template type.
+ operationId: addOrgSMSTemplate
+ description: |
+ Another organization SMS template with the same locale should not already exist in the
+ respective SMS template type.
+
+ Scope(Permission) required: `internal_template_mgt_create`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ description: SMS template to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ Location:
+ description: Location of the newly created SMS template.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/org-templates/{locale}':
+ get:
+ tags:
+ - SMS Templates
+ summary: Retrieves a single organization SMS template.
+ operationId: getOrgSMSTemplate
+ description: |
+ Retrieves the organization SMS template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ put:
+ tags:
+ - SMS Templates
+ summary: Replaces an existing organization SMS template.
+ operationId: updateOrgSMSTemplate
+ description: |
+ Replaces the organization SMS template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SMSTemplate'
+ description: Updated SMS template for the template type.
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - SMS Templates
+ summary: Removes an organization SMS template.
+ operationId: deleteOrgSMSTemplate
+ description: |
+ Removes an organization SMS template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/system-templates':
+ get:
+ tags:
+ - System Templates
+ summary: Retrieves the list of system SMS templates with the template type id.
+ operationId: getAllSystemTemplatesOfSMSTemplateType
+ description: |
+ Retrieves the list of system default SMS templates under the provided template type.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/system-templates/{locale}':
+ get:
+ tags:
+ - System Templates
+ summary: Retrieves the default organization SMS template.
+ operationId: getSystemSMSTemplate
+ description: |
+ Retrieves the system default SMS template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+
+servers:
+ # Added by API Auto Mocking Plugin
+ - url: 'https://api.asgardeo.io/t/{tenant-domain}/api/server/v1'
+ variables:
+ tenant-domain:
+ default: unknown
+
+components:
+ parameters:
+ templateTypeIdPathParam:
+ in: path
+ name: template-type-id
+ required: true
+ description: Template Type ID.
+ schema:
+ type: string
+ localePathParam:
+ in: path
+ name: locale
+ required: true
+ description: This should be a valid locale.
+ schema:
+ type: string
+ appUuidPathParam:
+ in: path
+ name: app-uuid
+ required: true
+ description: Application UUID.
+ schema:
+ type: string
+ responses:
+ NotFound:
+ description: The specified resource is not found.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
+ Unauthorized:
+ description: Unauthorized.
+ Forbidden:
+ description: Forbidden.
+ ServerError:
+ description: Internal Server Error.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
+ InvalidInput:
+ description: Invalid input request.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
+ Conflict:
+ description: Item Already Exists.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
+ Deleted:
+ description: Item/s Deleted.
+ Updated:
+ description: Item Updated.
+ securitySchemes:
+ BasicAuth:
+ type: http
+ scheme: basic
+ OAuth2:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: 'https://api.asgardeo.io/oauth2/authorize'
+ tokenUrl: 'https://api.asgardeo.io/oauth2/token'
+ scopes: {}
+ schemas:
+ TemplateType:
+ type: object
+ required:
+ - displayName
+ - self
+ properties:
+ displayName:
+ type: string
+ example: Account Confirmation
+ description: Display name of the template type.
+ self:
+ type: string
+ example: /t/{tenant-domain}/api/server/v1/notification/{{email|sms}}/template-types/YWNjb3VudGNvbmZpcm1hdGlvbg
+ description: Location of the created/updated resource.
+ TemplateTypeOverview:
+ type: object
+ required:
+ - displayName
+ properties:
+ displayName:
+ type: string
+ example: Account Confirmation
+ description: Display name of the template type.
+ TemplateTypeWithID:
+ allOf:
+ - $ref: '#/components/schemas/TemplateType'
+ - required:
+ - id
+ properties:
+ id:
+ type: string
+ example: YWNjb3VudGNvbmZpcm1hdGlvbg
+ description: Unique ID of the template type.
+ EmailTemplate:
+ type: object
+ required:
+ - contentType
+ - subject
+ - body
+ properties:
+ contentType:
+ type: string
+ example: text/html
+ description: Content type of the email template.
+ subject:
+ type: string
+ example: WSO2 - Account Confirmation
+ description: The subject of the email.
+ body:
+ type: string
+ example: HTML Body
+ description: The body of the email.
+ footer:
+ type: string
+ example: WSO2 Identity Server Team
+ description: The footer of the email.
+ EmailTemplateWithID:
+ allOf:
+ - $ref: '#/components/schemas/EmailTemplate'
+ - required:
+ - locale
+ properties:
+ locale:
+ type: string
+ example: en_US
+ description: >-
+ Locale of the email template.
+ SMSTemplate:
+ type: object
+ required:
+ - body
+ properties:
+ body:
+ type: string
+ example: SMS Body
+ description: The body of the SMS.
+ SMSTemplateWithID:
+ allOf:
+ - $ref: '#/components/schemas/SMSTemplate'
+ - required:
+ - locale
+ properties:
+ locale:
+ type: string
+ example: en_US
+ description: >-
+ Locale of the SMS template.
+ SimpleTemplate:
+ type: object
+ required:
+ - locale
+ - self
+ properties:
+ locale:
+ type: string
+ example: en_US
+ description: >-
+ Locale of the template.
+ self:
+ type: string
+ example: /t/{tenant-domain}/api/server/v1/notification/{{email|sms}}/template-types/YWNjb3VudGNvbmZpcm1hdGlvbg/{{org|app|system}}templates/en_US
+ description: Location of the created/updated resource. resource.
+ SimpleTemplateTypeID:
+ type: object
+ required:
+ - templateTypeId
+ - channel
+ properties:
+ templateTypeId:
+ type: string
+ example: YWNjb3VudGNvbmZpcm1hdGlvbg
+ description: Unique ID of the template type.
+ channel:
+ type: string
+ example: EMAIL
+ description: Notification channel of the template type (SMS or EMAIL).
+ Error:
+ type: object
+ required:
+ - code
+ - message
+ properties:
+ code:
+ type: string
+ example: NTM-50000
+ message:
+ type: string
+ example: Some Error Message
+ description:
+ type: string
+ example: Some Error Description
+ traceId:
+ type: string
+ example: TR0001
diff --git a/en/asgardeo/docs/references/sms-templates.md b/en/asgardeo/docs/references/sms-templates.md
new file mode 100644
index 0000000000..2088a28791
--- /dev/null
+++ b/en/asgardeo/docs/references/sms-templates.md
@@ -0,0 +1,3 @@
+{% set product_name = "Asgardeo" %}
+{% set api_path = "notification-template" %}
+{% include "../../../includes/references/sms-templates.md" %}
diff --git a/en/asgardeo/mkdocs.yml b/en/asgardeo/mkdocs.yml
index 3a61b4f7a0..2f9b9c4093 100644
--- a/en/asgardeo/mkdocs.yml
+++ b/en/asgardeo/mkdocs.yml
@@ -386,6 +386,7 @@ nav:
- Identity provider API: apis/idp.md
- Identity verification provider API: apis/identity-verification-providers.md
- Idle account identification API: apis/idle-account-identification.md
+ - Notification templates management API: apis/notification-templates.md
- OAuth Dynamic Client Registration API: apis/dynamic-client-registration-rest-api.md
- Organization discovery API: apis/organization-discovery.md
- Organization discovery configuration management API: apis/organization-discovery-config-mgt-rest-api.md
@@ -454,6 +455,7 @@ nav:
- Remote user store properties: references/remote-user-store/remote-user-store-properties.md
- Authorization policies for apps: references/authorization-policies-for-apps.md
- Email templates: references/email-templates.md
+ - SMS templates: references/sms-templates.md
- Actions:
- Pre issue access token action:
- API contract to implement: references/actions/pre-issue-access-token-action/api-contract.md
diff --git a/en/identity-server/next/docs/apis/notification-templates.md b/en/identity-server/next/docs/apis/notification-templates.md
new file mode 100644
index 0000000000..bf6a050f97
--- /dev/null
+++ b/en/identity-server/next/docs/apis/notification-templates.md
@@ -0,0 +1,5 @@
+---
+template: templates/redoc.html
+---
+
+
diff --git a/en/identity-server/next/docs/apis/restapis/notification-templates.yml b/en/identity-server/next/docs/apis/restapis/notification-templates.yml
new file mode 100644
index 0000000000..34fa41fccd
--- /dev/null
+++ b/en/identity-server/next/docs/apis/restapis/notification-templates.yml
@@ -0,0 +1,1310 @@
+openapi: 3.0.0
+info:
+ title: "WSO2 Identity Server - Notification Templates API"
+ version: 1.0.0
+ description: >-
+ This is the RESTful API for managing notification templates in the WSO2 Identity
+ Server. This API allows adding, retrieving, replacing, and removing notification
+ templates and template types.
+tags:
+ - name: Email Template Types
+ description: An email template type can have multiple email templates for different languages.
+ - name: Email Templates
+ description: An email template of a specific type and a language.
+ - name: Application Email Templates
+ description: An application email template of a specific type and a language.
+ - name: SMS Template Types
+ description: A SMS template type can have multiple SMS templates for different languages.
+ - name: SMS Templates
+ description: A SMS template of a specific type and a language.
+ - name: Application SMS Templates
+ description: An application email template of a specific type and a language.
+ - name: System Templates
+ description: A system default template of a specific type and a language.
+security:
+ - OAuth2: []
+ - BasicAuth: []
+paths:
+ /notification/email/template-types:
+ get:
+ tags:
+ - Email Template Types
+ summary: Retrieves all the email template types.
+ operationId: getAllEmailTemplateTypes
+ description: |
+ Retrieves all the email template types in the system.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - Email Template Types
+ summary: Adds a new email template type.
+ operationId: addEmailTemplateType
+ description: |
+ Adds a new email template type to the system. An email template type can have any number of
+ organization or application email templates.
+
+ * Attribute _**displayName**_ of the template type should be unique.
+
+ Scope(Permission) required: `internal_email_mgt_create` / `internal_template_mgt_update`
+
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TemplateTypeOverview'
+ description: Email template type to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ self:
+ description: Location of the newly created email template type.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}':
+ get:
+ tags:
+ - Email Template Types
+ summary: Retrieves the email template type corresponding to the template type id.
+ operationId: getEmailTemplateType
+ description: |
+ Retrieves the email template type in the system identified by the template-type-id.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - Email Template Types
+ summary: Removes an email template type.
+ operationId: deleteEmailTemplateType
+ description: |
+ Removes an existing email template type with all its email templates
+ from the system.
+ *Note : System resources are not eligible for deletion. Attempting to delete a system resource will result in a 403 Forbidden error.*
+
+ Scope(Permission) required: `internal_email_mgt_delete` / `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/reset-template-type':
+ post:
+ tags:
+ - Functions
+ summary: Resets an template type.
+ operationId: resetTemplateType
+ description: |
+ Resets an existing template type by deleting all its **user defined** templates
+ from the system.
+
+ Scope(Permission) required: `internal_template_mgt_delete`
+
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SimpleTemplateTypeID'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/org-templates':
+ get:
+ tags:
+ - Email Templates
+ summary: Retrieves the list of organization email templates under the provided template type.
+ operationId: getAllOrgTemplatesOfEmailTemplateType
+ description: |
+ Retrieves the list of organization email templates under the provided template type.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - Email Templates
+ summary: Adds a new organization email template to an existing email template type.
+ operationId: addOrgEmailTemplate
+ description: |
+ Another organization email template with the same locale should not already exist in the
+ respective email template type.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ description: Email template to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ Location:
+ description: Location of the newly created email template.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/app-templates/{app-uuid}':
+ get:
+ tags:
+ - Application Email Templates
+ summary: Retrieves the list of application email templates under the provided template type.
+ operationId: getAllAppTemplatesOfEmailTemplateType
+ description: |
+ Retrieves the list of application email templates under the provided template type.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - Application Email Templates
+ summary: Adds a new application email template to an existing email template type.
+ operationId: addAppEmailTemplate
+ description: |
+ Another application email template with the same locale should not already exist in the
+ respective email template type.
+
+ Scope(Permission) required: `internal_email_mgt_create` / `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ description: Email template to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ Location:
+ description: Location of the newly created email template.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/org-templates/{locale}':
+ get:
+ tags:
+ - Email Templates
+ summary: Retrieves a single organization email template.
+ operationId: getOrgEmailTemplate
+ description: |
+ Retrieves the organization email template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ put:
+ tags:
+ - Email Templates
+ summary: Replaces an existing organization email template.
+ operationId: updateOrgEmailTemplate
+ description: |
+ Replaces the organization email template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_update` / `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailTemplate'
+ description: Updated email template for the template type.
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - Email Templates
+ summary: Removes an organization email template.
+ operationId: deleteOrgEmailTemplate
+ description: |
+ Removes an organization email template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_delete` / `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/system-templates':
+ get:
+ tags:
+ - System Templates
+ summary: Retrieves the system email templates of template type.
+ operationId: getAllSystemTemplatesOfEmailTemplateType
+ description: |
+ Retrieves the list of system default email templates under the provided template type.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/system-templates/{locale}':
+ get:
+ tags:
+ - System Templates
+ summary: Retrieves the default email template for given type and locale.
+ operationId: getSystemEmailTemplate
+ description: |
+ Retrieves the system default email template that matches the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/email/template-types/{template-type-id}/app-templates/{app-uuid}/{locale}':
+ get:
+ tags:
+ - Application Email Templates
+ summary: Retrieves a single email template of application.
+ operationId: getAppEmailTemplate
+ description: |
+ Retrieves the application email template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_view` / `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/EmailTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ put:
+ tags:
+ - Application Email Templates
+ summary: Replaces an existing application email template.
+ operationId: updateAppEmailTemplate
+ description: |
+ Replaces the application email template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_update` / `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/EmailTemplate'
+ description: Email templates for the template type.
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - Application Email Templates
+ summary: Removes an application email template.
+ operationId: deleteAppEmailTemplate
+ description: |
+ Removes an application email template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_email_mgt_delete` / `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ /notification/sms/template-types:
+ get:
+ tags:
+ - SMS Template Types
+ summary: Retrieves all the SMS template types.
+ operationId: getAllSMSTemplateTypes
+ description: |
+ Retrieves all the SMS template types in the system.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - SMS Template Types
+ summary: Adds a new SMS template type.
+ operationId: addSMSTemplateType
+ description: |
+ Adds a new SMS template type to the system. A SMS template type can have any number of
+ organization or application SMS templates.
+
+ * Attribute _**displayName**_ of the template type should be unique.
+
+ Scope(Permission) required: `internal_template_mgt_create`
+
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/TemplateTypeOverview'
+ description: SMS template type to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ self:
+ description: Location of the newly created SMS template type.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}':
+ get:
+ tags:
+ - SMS Template Types
+ summary: Retrieves the SMS template type corresponding to the template type id.
+ operationId: getSMSTemplateType
+ description: |
+ Retrieves the SMS template type in the system identified by the template-type-id.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/TemplateTypeWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - SMS Template Types
+ summary: Removes a SMS template type.
+ operationId: deleteSMSTemplateType
+ description: |
+ Removes an existing SMS template type with all its SMS templates
+ from the system.
+ *Note : System resources are not eligible for deletion. Attempting to delete a system resource will result in a 403 Forbidden error.*
+
+ Scope(Permission) required: `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/app-templates/{app-uuid}':
+ get:
+ tags:
+ - Application SMS Templates
+ summary: Retrieves the list of application SMS templates under the provided template type.
+ operationId: getAllAppTemplatesOfSMSTemplateType
+ description: |
+ Retrieves the list of application SMS templates under the provided template type.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - Application SMS Templates
+ summary: Adds a new application SMS template to an existing SMS template type.
+ operationId: addAppSMSTemplate
+ description: |
+ Another application SMS template with the same locale should not already exist in the
+ respective SMS template type.
+
+ Scope(Permission) required: `internal_template_mgt_create`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ description: SMS template to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ Location:
+ description: Location of the newly created SMS template.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/app-templates/{app-uuid}/{locale}':
+ get:
+ tags:
+ - Application SMS Templates
+ summary: Retrieves a single SMS template of application.
+ operationId: getAppSMSTemplate
+ description: |
+ Retrieves the application SMS template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ put:
+ tags:
+ - Application SMS Templates
+ summary: Replaces an existing application SMS template.
+ operationId: updateAppSMSTemplate
+ description: |
+ Replaces the application SMS template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SMSTemplate'
+ description: Application SMS template for the template type and locale.
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - Application SMS Templates
+ summary: Removes a SMS template.
+ operationId: deleteAppSMSTemplate
+ description: |
+ Removes a SMS template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/appUuidPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/org-templates':
+ get:
+ tags:
+ - SMS Templates
+ summary: Retrieves the list of organization SMS templates under the provided template type.
+ operationId: getAllOrgTemplatesOfSMSTemplateType
+ description: |
+ Retrieves the list of organization SMS templates under the provided templalte type.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ post:
+ tags:
+ - SMS Templates
+ summary: Adds a new organization SMS template to an existing SMS template type.
+ operationId: addOrgSMSTemplate
+ description: |
+ Another organization SMS template with the same locale should not already exist in the
+ respective SMS template type.
+
+ Scope(Permission) required: `internal_template_mgt_create`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ description: SMS template to be added.
+ responses:
+ '201':
+ description: Item Created
+ headers:
+ Location:
+ description: Location of the newly created SMS template.
+ schema:
+ type: string
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '409':
+ $ref: '#/components/responses/Conflict'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/org-templates/{locale}':
+ get:
+ tags:
+ - SMS Templates
+ summary: Retrieves a single organization SMS template.
+ operationId: getOrgSMSTemplate
+ description: |
+ Retrieves the organization SMS template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ put:
+ tags:
+ - SMS Templates
+ summary: Replaces an existing organization SMS template.
+ operationId: updateOrgSMSTemplate
+ description: |
+ Replaces the organization SMS template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_update`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SMSTemplate'
+ description: Updated SMS template for the template type.
+ responses:
+ '200':
+ $ref: '#/components/responses/Updated'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ delete:
+ tags:
+ - SMS Templates
+ summary: Removes an organization SMS template.
+ operationId: deleteOrgSMSTemplate
+ description: |
+ Removes an organization SMS template identified by the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_delete`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '204':
+ $ref: '#/components/responses/Deleted'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/system-templates':
+ get:
+ tags:
+ - System Templates
+ summary: Retrieves the list of system SMS templates with the template type id.
+ operationId: getAllSystemTemplatesOfSMSTemplateType
+ description: |
+ Retrieves the list of system default SMS templates under the provided template type.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ type: array
+ items:
+ $ref: '#/components/schemas/SimpleTemplate'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+ '/notification/sms/template-types/{template-type-id}/system-templates/{locale}':
+ get:
+ tags:
+ - System Templates
+ summary: Retrieves the default organization SMS template.
+ operationId: getSystemSMSTemplate
+ description: |
+ Retrieves the system default SMS template that matches to the template-type-id and the locale.
+
+ Scope(Permission) required: `internal_template_mgt_view`
+
+ parameters:
+ - $ref: '#/components/parameters/templateTypeIdPathParam'
+ - $ref: '#/components/parameters/localePathParam'
+ responses:
+ '200':
+ description: Search results matching the given criteria.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/SMSTemplateWithID'
+ '400':
+ $ref: '#/components/responses/InvalidInput'
+ '401':
+ $ref: '#/components/responses/Unauthorized'
+ '403':
+ $ref: '#/components/responses/Forbidden'
+ '404':
+ $ref: '#/components/responses/NotFound'
+ '500':
+ $ref: '#/components/responses/ServerError'
+
+servers:
+ # Added by API Auto Mocking Plugin
+ - url: 'https://localhost:9443/t/{tenant-domain}/api/server/v1'
+ variables:
+ tenant-domain:
+ default: unknown
+
+components:
+ parameters:
+ templateTypeIdPathParam:
+ in: path
+ name: template-type-id
+ required: true
+ description: Template Type ID.
+ schema:
+ type: string
+ localePathParam:
+ in: path
+ name: locale
+ required: true
+ description: This should be a valid locale.
+ schema:
+ type: string
+ appUuidPathParam:
+ in: path
+ name: app-uuid
+ required: true
+ description: Application UUID.
+ schema:
+ type: string
+ responses:
+ NotFound:
+ description: The specified resource is not found.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
+ Unauthorized:
+ description: Unauthorized.
+ Forbidden:
+ description: Forbidden.
+ ServerError:
+ description: Internal Server Error.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
+ InvalidInput:
+ description: Invalid input request.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
+ Conflict:
+ description: Item Already Exists.
+ content:
+ 'application/json':
+ schema:
+ $ref: '#/components/schemas/Error'
+ Deleted:
+ description: Item/s Deleted.
+ Updated:
+ description: Item Updated.
+ securitySchemes:
+ BasicAuth:
+ type: http
+ scheme: basic
+ OAuth2:
+ type: oauth2
+ flows:
+ authorizationCode:
+ authorizationUrl: 'https://localhost:9443/oauth2/authorize'
+ tokenUrl: 'https://localhost:9443/oauth2/token'
+ scopes: {}
+ schemas:
+ TemplateType:
+ type: object
+ required:
+ - displayName
+ - self
+ properties:
+ displayName:
+ type: string
+ example: Account Confirmation
+ description: Display name of the template type.
+ self:
+ type: string
+ example: /t/{tenant-domain}/api/server/v1/notification/{{email|sms}}/template-types/YWNjb3VudGNvbmZpcm1hdGlvbg
+ description: Location of the created/updated resource.
+ TemplateTypeOverview:
+ type: object
+ required:
+ - displayName
+ properties:
+ displayName:
+ type: string
+ example: Account Confirmation
+ description: Display name of the template type.
+ TemplateTypeWithID:
+ allOf:
+ - $ref: '#/components/schemas/TemplateType'
+ - required:
+ - id
+ properties:
+ id:
+ type: string
+ example: YWNjb3VudGNvbmZpcm1hdGlvbg
+ description: Unique ID of the template type.
+ EmailTemplate:
+ type: object
+ required:
+ - contentType
+ - subject
+ - body
+ properties:
+ contentType:
+ type: string
+ example: text/html
+ description: Content type of the email template.
+ subject:
+ type: string
+ example: WSO2 - Account Confirmation
+ description: The subject of the email.
+ body:
+ type: string
+ example: HTML Body
+ description: The body of the email.
+ footer:
+ type: string
+ example: WSO2 Identity Server Team
+ description: The footer of the email.
+ EmailTemplateWithID:
+ allOf:
+ - $ref: '#/components/schemas/EmailTemplate'
+ - required:
+ - locale
+ properties:
+ locale:
+ type: string
+ example: en_US
+ description: >-
+ Locale of the email template.
+ SMSTemplate:
+ type: object
+ required:
+ - body
+ properties:
+ body:
+ type: string
+ example: SMS Body
+ description: The body of the SMS.
+ SMSTemplateWithID:
+ allOf:
+ - $ref: '#/components/schemas/SMSTemplate'
+ - required:
+ - locale
+ properties:
+ locale:
+ type: string
+ example: en_US
+ description: >-
+ Locale of the SMS template.
+ SimpleTemplate:
+ type: object
+ required:
+ - locale
+ - self
+ properties:
+ locale:
+ type: string
+ example: en_US
+ description: >-
+ Locale of the template.
+ self:
+ type: string
+ example: /t/{tenant-domain}/api/server/v1/notification/{{email|sms}}/template-types/YWNjb3VudGNvbmZpcm1hdGlvbg/{{org|app|system}}templates/en_US
+ description: Location of the created/updated resource. resource.
+ SimpleTemplateTypeID:
+ type: object
+ required:
+ - templateTypeId
+ - channel
+ properties:
+ templateTypeId:
+ type: string
+ example: YWNjb3VudGNvbmZpcm1hdGlvbg
+ description: Unique ID of the template type.
+ channel:
+ type: string
+ example: EMAIL
+ description: Notification channel of the template type (SMS or EMAIL).
+ Error:
+ type: object
+ required:
+ - code
+ - message
+ properties:
+ code:
+ type: string
+ example: NTM-50000
+ message:
+ type: string
+ example: Some Error Message
+ description:
+ type: string
+ example: Some Error Description
+ traceId:
+ type: string
+ example: TR0001
\ No newline at end of file
diff --git a/en/identity-server/next/docs/references/sms-templates.md b/en/identity-server/next/docs/references/sms-templates.md
new file mode 100644
index 0000000000..9a08736074
--- /dev/null
+++ b/en/identity-server/next/docs/references/sms-templates.md
@@ -0,0 +1,2 @@
+{% set api_path = "notification-templates-rest-api" %}
+{% include "../../../../includes/references/sms-templates.md" %}
\ No newline at end of file
diff --git a/en/identity-server/next/mkdocs.yml b/en/identity-server/next/mkdocs.yml
index c6cce45397..61bfde0baa 100644
--- a/en/identity-server/next/mkdocs.yml
+++ b/en/identity-server/next/mkdocs.yml
@@ -791,6 +791,7 @@ nav:
- Email templates:
- Email templates v1 API: apis/email-templates-rest-api.md
- Email templates v2 API: apis/email-templates-v2-rest-api.md
+ - Notification Templates Management APIs: apis/notification-templates.md
- Session management API: apis/session-mgt-rest-api.md
- Server configuration API: apis/configs-rest-api.md
- User Functionality management API: apis/user-functionality-mgt-rest-api.md
@@ -864,7 +865,9 @@ nav:
- Conditional authentication:
- Conditional auth - API: references/conditional-auth/api-reference.md
- Authorization policies for apps: references/authorization-policies-for-apps.md
- - Email templates: references/email-templates.md
+ - Notification templates:
+ - Email templates: references/email-templates.md
+ - SMS templates: references/sms-templates.md
- Actions:
- Pre issue access token action:
- API contract to implement: references/actions/pre-issue-access-token-action/api-contract.md
diff --git a/en/includes/references/sms-templates.md b/en/includes/references/sms-templates.md
new file mode 100644
index 0000000000..b276cce882
--- /dev/null
+++ b/en/includes/references/sms-templates.md
@@ -0,0 +1,80 @@
+# SMS templates
+
+{{ product_name }} organizations use several SMS templates to send SMS notifications to users.
+
+!!! note
+
+ - You can customize all available SMS templates to match your organization's preferences using the [Notification Template Management API]({{base_path}}/apis/{{ api_path }}/).
+ - You can also use the Console to change some of the most frequently used SMS templates in {{ product_name }}. Learn how to [customize SMS content from the Console]({{base_path}}/guides/branding/customize-sms-templates/#customize-sms-content).
+
+
+## SMS templates in {{ product_name }}
+
+The following is a list of all SMS templates available in {{ product_name }}.
+
+
+
+ Template ID |
+ Description |
+
+
+
+ SMSOTP |
+ These SMS messages are sent when a user attempts to sign in to an account using SMS OTP. The OTP can be displayed using the {{"{{confirmation-code}}"}} literal. |
+
+
+ passwordReset |
+ These SMS messages are sent when a user attempts to recover the password using SMS OTP. The OTP can be displayed using the {{"{{confirmation-code}}"}} literal. |
+
+ {% if product_name != "Asgardeo" %}
+
+ accountconfirmation |
+ These SMS messages are sent when a user creates an account in {{ product_name }}, when administrators have enabled account confirmation via SMS. The OTP can be displayed using the {{"{{confirmation-code}}"}} literal. |
+
+
+ verifyMobileOnUpdate |
+ This SMS message is sent when a user changes the mobile number associated with the account, when administrators have enabled mobile number verification. The OTP can be displayed using the {{"{{confirmation-code}}"}} literal. |
+
+
+ accountIdRecovery |
+ This SMS message is sent when a user requests a username recovery. The username can be displayed using the {{"{{user-name}}"}} literal. |
+
+ {% endif %}
+
+
+
+## Literals in SMS templates
+
+Literals are placeholders used to display dynamic information in SMS templates. The following are the template literals that are accessible for all SMS templates in {{ product_name }}.
+
+### General literals
+
+The following user-related literals are accessible for all SMS templates.
+
+
+
+ Literal |
+ Description |
+
+
+
+ {{"{{user-name}}"}} |
+ Name of the user account. |
+
+
+ {{"{{userstore-domain}}"}} |
+ Name of the user store. |
+
+
+ {{"{{organization-name}}"}} |
+ Name of the organization. Insert this placeholder where you want to display the organization's name in a human-readable format. |
+
+
+ {{"{{tenant-domain}}"}} |
+ Domain name specific to the organization. For root organizations, this is the human-readable domain name. For other organizations, it is the UUID. |
+
+
+
+
+!!! note
+ Root organizations created before October 2022 will utilize `{{"{{ tenant-domain }}"}}` as the placeholder to represent the organization name. As this placeholder may not provide the organization name in a human-readable format, consider updating it to `{{"{{ organization-name }}"}}` as needed for clarity and ease of understanding.