Get Push Template

Gets a specified push template setting of the company (tenant) in the current session.

HTTP Request

GET /api/sonar/push-templates/:type
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
Request Parameter
typeOStringTemplate typeRefer to the below table.

Refer to the below table for available template types:

Template typeDescription
explanation_domainSubmission domain. https://DOMAIN format
mail_explain_req_subjectTitle of explanation request email
mail_explain_req_bodyBoby of explanation request email
mail_explain_review_req_subjectTitle of review request email
mail_explain_review_req_bodyBoby of review request email
sms_explain_req_msgExplanation request SMS message
sms_explain_review_req_msgReview request SMS message

Success Response

  "template": "An explanation request for the $category case has been mailed to you. Due: $expire_date"
  • template (String): Template content

    You can use the following macros for template content:

    $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

Error Responses

Template type is not supported

HTTP status code 400

  "error_code": "invalid-argument",
  "error_msg": "type should be one of explanation_domain, mail_explain_req_subject, mail_explain_req_body, mail_explain_review_req_subject, mail_explain_review_req_body, sms_explain_req_msg, sms_explain_review_req_msg."