https://www.docusign.com/v2.1/accounts/{accountId}/templatesCreates one or more template definitions, using a multipart request for each template. Templates help streamline the sending process when you frequently send the same or similar documents, or send different documents to the same group of people. When you create a template, you define placeholder roles. Rather than specifying a person, you specify a role that regularly participates in a transaction that uses the template. Then, when you create or send an envelope based on the template, you assign actual recipients to the template roles. The recipients automatically inherit all of the workflow that is defined for that role in the template, such as the tabs and routing information. ## Template Email Subject Merge Fields Placeholder roles have associated merge fields that personalize the email notification that Docusign sends. For example, the template automatically personalizes the email message by adding placeholders for the recipient's name and email address within the email subject line, based on the recipient's role. When the sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to find out who the recipient is. Use the following placeholders to insert a recipient's name or email address in the subject line To insert a recipient's name into the subject line, use the `[[<roleName>_UserName]]` placeholder in the `emailSubject` property when you create the template: To include a recipient's name or email address in the subject line, use the following placeholders in the `emailSubject` property: - `[[<roleName>_UserName]]` - `[[<roleName>_Email]]` For example, if the role name is `Signer 1`, you might set `emailSubject` to one of these strings: - `"[[Signer 1_UserName]], Please sign this NDA"` - `"[[Signer 1_Email]], Please sign this NDA"` **Note:** The maximum length of the subject line is 100 characters, including any merged text. ## Creating multiple templates To create multiple templates, you provide a zip file of JSON files. You can also use the Templates::ListTemplates method with the `is_download` query parameter to download a zip file containing your existing templates and use that as a guide. The API supports both .zip and .gzip file formats as input. You also need to set the `Content-Length`, `Content-Type`, and `Content-Disposition` headers: ``` Content-Length: 71068 Content-Type: application/zip Content-Disposition: file; filename="DocuSignTemplates_Nov_25_2019_20_40_21.zip"; fileExtension=.zip ``` ### Related topics - How to create a template
(Required) The external account number (int) or account ID GUID.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'https://www.docusign.com/v2.1/accounts/{accountId}/templates' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}https://www.docusign.com/v2.1/accounts/{accountId}/templatesCreates one or more template definitions, using a multipart request for each template. Templates help streamline the sending process when you frequently send the same or similar documents, or send different documents to the same group of people. When you create a template, you define placeholder roles. Rather than specifying a person, you specify a role that regularly participates in a transaction that uses the template. Then, when you create or send an envelope based on the template, you assign actual recipients to the template roles. The recipients automatically inherit all of the workflow that is defined for that role in the template, such as the tabs and routing information. ## Template Email Subject Merge Fields Placeholder roles have associated merge fields that personalize the email notification that Docusign sends. For example, the template automatically personalizes the email message by adding placeholders for the recipient's name and email address within the email subject line, based on the recipient's role. When the sender adds the name and email information for the recipient and sends the envelope, the recipient information is automatically merged into the appropriate fields in the email subject line. Both the sender and the recipients will see the information in the email subject line for any emails associated with the template. This provides an easy way for senders to organize their envelope emails without having to open an envelope to find out who the recipient is. Use the following placeholders to insert a recipient's name or email address in the subject line To insert a recipient's name into the subject line, use the `[[<roleName>_UserName]]` placeholder in the `emailSubject` property when you create the template: To include a recipient's name or email address in the subject line, use the following placeholders in the `emailSubject` property: - `[[<roleName>_UserName]]` - `[[<roleName>_Email]]` For example, if the role name is `Signer 1`, you might set `emailSubject` to one of these strings: - `"[[Signer 1_UserName]], Please sign this NDA"` - `"[[Signer 1_Email]], Please sign this NDA"` **Note:** The maximum length of the subject line is 100 characters, including any merged text. ## Creating multiple templates To create multiple templates, you provide a zip file of JSON files. You can also use the Templates::ListTemplates method with the `is_download` query parameter to download a zip file containing your existing templates and use that as a guide. The API supports both .zip and .gzip file formats as input. You also need to set the `Content-Length`, `Content-Type`, and `Content-Disposition` headers: ``` Content-Length: 71068 Content-Type: application/zip Content-Disposition: file; filename="DocuSignTemplates_Nov_25_2019_20_40_21.zip"; fileExtension=.zip ``` ### Related topics - How to create a template
(Required) The external account number (int) or account ID GUID.
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'https://www.docusign.com/v2.1/accounts/{accountId}/templates' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}