Get Notification Templates
Gets a list of notification template settings of the company (tenant) in the current session. You can check a specific type's template per locale using the Get Notification Template API.
Required Permissions
Requires the Cluster Administrator role.
HTTP Request
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
https://HOSTNAME/api/sonar/push-templates
Success Response
{
"templates": {
"sms_explain_req_msg": "An explanation request for the $category case has been mailed to you. Due: $expire_date",
"sms_explain_review_req_msg": "The explanation review request for $emp_name $emp_title has been mailed to you. Due: $expire_date"
}
}
-
templates (Map): Template option key/value pairs
Option Key Description explanation_domain Submission domain. https://DOMAIN format mail_explain_req_subject Title of explanation request email mail_explain_req_body Body of explanation request email mail_explain_review_req_subject Title of review request email mail_explain_review_req_body Body of review request email sms_explain_req_msg Explanation request SMS message sms_explain_review_req_msg Review request SMS message mail_explain_complete_subject Title of explanation completion email mail_explain_complete_body Body of explanation completion email mail_user_verification_subject Title of MFA verification code email mail_user_verification_body Body of MFA verification code email mail_report_subject Title of report email mail_report_body Body of report email mail_default_body Default mail body (body template used by the sonar-sendmail command, also used as a fallback when the playbook mail body is not configured) mail_playbook_body Playbook mail body mail_ticket_alarm_subject Title of ticket alarm email mail_ticket_alarm_body Body of ticket alarm email The following macros apply only to the six mail title/body types
mail_explain_req_subject,mail_explain_req_body,mail_explain_review_req_subject,mail_explain_review_req_body,mail_explain_complete_subject, andmail_explain_complete_body, and are substituted with actual values when an explanation request is sent.explanation_domainis not a macro substitution target — it is the submission domain address used as the$urlvalue in the templates above. Whethersms_explain_req_msgandsms_explain_review_req_msggo through this substitution logic could not be confirmed, so this is not asserted either way. The macros used by other types depend on the sending logic of the corresponding feature.Macro Description $category Category $emp_key Employee number $emp_name Employee name $emp_title Employee title $url Submission URL $expire_date Submission due date (yyyy-MM-dd) $expire_time Submission due time (HH:mm:ss) $user_note User note in case of auto-request $create_date Explanation request creation date (yyyy-MM-dd) $create_time Explanation request creation time (HH:mm:ss)
Error Responses
Permission denied
HTTP status code 500
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}