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

GET /api/sonar/push-templates
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 KeyDescription
    explanation_domainSubmission domain. https://DOMAIN format
    mail_explain_req_subjectTitle of explanation request email
    mail_explain_req_bodyBody of explanation request email
    mail_explain_review_req_subjectTitle of review request email
    mail_explain_review_req_bodyBody of review request email
    sms_explain_req_msgExplanation request SMS message
    sms_explain_review_req_msgReview request SMS message
    mail_explain_complete_subjectTitle of explanation completion email
    mail_explain_complete_bodyBody of explanation completion email
    mail_user_verification_subjectTitle of MFA verification code email
    mail_user_verification_bodyBody of MFA verification code email
    mail_report_subjectTitle of report email
    mail_report_bodyBody of report email
    mail_default_bodyDefault 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_bodyPlaybook mail body
    mail_ticket_alarm_subjectTitle of ticket alarm email
    mail_ticket_alarm_bodyBody 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, and mail_explain_complete_body, and are substituted with actual values when an explanation request is sent. explanation_domain is not a macro substitution target — it is the submission domain address used as the $url value in the templates above. Whether sms_explain_req_msg and sms_explain_review_req_msg go 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.

    MacroDescription
    $categoryCategory
    $emp_keyEmployee number
    $emp_nameEmployee name
    $emp_titleEmployee title
    $urlSubmission URL
    $expire_dateSubmission due date (yyyy-MM-dd)
    $expire_timeSubmission due time (HH:mm:ss)
    $user_noteUser note in case of auto-request
    $create_dateExplanation request creation date (yyyy-MM-dd)
    $create_timeExplanation request creation time (HH:mm:ss)

Error Responses

Permission denied

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}