Using email templates

Getting existing email templates

To access existing email templates, utilize the API endpoint detailed here: API Documentation.
Send a GET request to /casefile/message/templates. This request retrieves a list of available case file message templates specific to the user, structured as JSON objects, each including attributes like customerId, subject, message, title, and id.

For example, a template might appear as:

[
  {
    "customerId": 1,
    "subject": "Dokumenter til underskrift: {{casefile.name}}",
    "message": "Kære {{recipient.name}}, Her er dokumentet som aftalt",
    "title": "Blanket",
    "id": 1
  }
]

Applying email template to signing request

To apply a template to a signing request, use the PUT method with the endpoint /signingrequests/{signingRequestId}, replacing {signingRequestId} with the specific ID of the signing request you wish to use the email template with. In the request body, include the recipient's email, and map the subject and message from the retrieved template to emailSubject and emailText fields, respectively.

Example request body:

{
  "email": "[email protected]",
  "emailSubject": "Dokumenter til underskrift: {{casefile.name}}", <-- copy the value from our email template
  "emailText": "Kære {{recipient.name}}, Her er dokumentet som aftalt" <-- copy the value from our email template
}

:warning: Important: When values such as emailSubject and emailText are copied from an email template, be aware that any subsequent updates made to the original template will not automatically reflect in these fields. Manual updates are required to ensure consistency.

Creating and updating email templates is also supported through the API. For detailed instructions and more information, refer to the [API Documentation](Creating and updating email templates is also supported through the API. For detailed instructions and more information, refer to the API Documentation.)