Using email message templates on the Simple case file creation endpoint
To use existing email message templates, you must fetch the template data first and then inject it into the Simple case file creation request.
The Simple case file creation endpoint requires you to explicitly define the email message text and subject for each signer. This provides maximum flexibility but requires a two-step process if you want to reuse existing email message templates.
Implementation Workflow
-
GET the email message templates: Call the GET message templates endpoint to retrieve a list of all configured email message templates for the user.
Goal: Identify the subject and body of the template you wish to use.
-
Map email message template to the request: Take the text from your chosen template and map it to the individual signer properties
emailTextandemailSubjectin your request towards the Simple case file creation endpoint. -
Create the case file: Inject the strings into the
emailTextandemailSubjectfields and send request.
Example Mapping
{
"caseFile": {
"title": "<insert casefile name>",
"signers": [
{
"name": "<signer name 1>",
"email": "<signer 1 email>",
"emailSubject": "<inject the string>",
"emailText": "<inject the string>"
},
{
"name": "<signer name 2>",
"email": "<signer 2 email>",
"emailSubject": "<inject another or the same the string>",
"emailText": "<inject another or the same the string>"
}
],
"documents": [
{
"name": "<name of the file>",
"title": "<enter a document title>"
}
]
}
}Updated about 8 hours ago
