To add signature fields or display dynamic values like a recipient’s name, see Places.
How it works
Create a DOCX file and embed fields and conditionals using double curly braces:{{key}}. When you create an envelope, provide the data in the data property of the document. SignatureAPI merges the template with your data and produces the final document.
Provide the template URL in the url property and set format to docx.
{{double curly braces}} vs [[double brackets]]: these serve different purposes:{{field_key}}: Template fields. Inject dynamic content (names, dates, addresses) into the document text before signing. Only available in DOCX documents.[[place_key]]: Place placeholders. Position signature fields, text inputs, checkboxes, and other interactive places. Works in both PDF and DOCX documents. See Place Positioning.
{{}} to inject content and [[]] to position places.Fields
Fields mark locations in the template where data is inserted. Use double curly braces to define a field:{{key}}.
Template:
This agreement is entered into by {{name}}.
Data:
This agreement is entered into by Sherlock Holmes.
Nested objects
Data values can be nested objects. Use dot notation in the template to reference nested keys. Template:This agreement is entered into by {{person.name}}, residing at {{person.address.houseNumber}} {{person.address.streetName}}, {{person.address.city}}.
Data:
This agreement is entered into by Sherlock Holmes, residing at 221b Baker Street, London.
Conditionals
Conditionals control which sections appear in the final document based on your data.If
Use{{if condition}} and {{endif}} to show or hide a block of content.
Template:
Please read before proceeding.{{if showDisclaimer}}
Information provided is for educational purposes only and should not be considered as professional advice.
{{endif}}Use at your own discretion.
With Information provided is for educational purposes only and should not be considered as professional advice.
{{endif}}Use at your own discretion.
"showDisclaimer": true, the disclaimer appears. With "showDisclaimer": false, it is omitted.
If-Else
Use{{if condition}}, {{else}}, and {{endif}} to display one of two blocks based on a condition.
Template:
{{if mediation}}
Any dispute shall be resolved by mediation, with each party bearing its own costs.
{{else}}
Any dispute shall be settled by arbitration, and the arbitrator’s decision is final.
{{endif}}
With Any dispute shall be resolved by mediation, with each party bearing its own costs.
{{else}}
Any dispute shall be settled by arbitration, and the arbitrator’s decision is final.
{{endif}}
"mediation": true:
Any dispute shall be resolved by mediation, with each party bearing its own costs.
With "mediation": false:
Any dispute shall be settled by arbitration, and the arbitrator’s decision is final.