v1

latestOpenAPI 3.0.12026-07-242682197.7 KB
Document

Create Document from Template

Creates and optionally sends a new document for signing. If draft is set to true the document will not be sent. Pre-signed template signatures and initials are copied to the new document as document content — they remain visible on the document but do not generate a signing event, do not emit a document_signed webhook, and the recipient's status will not reflect them as a real signing action. If the template was pre-signed for a signer and the request adds new unsigned signature/initials fields for that same signer, the pre-applied ratifications are cleared silently so the signer is asked to sign once.

post/api/v1/document_templates/documents

Request body

test_modeboolean

Set to true to enable Test Mode. Documents created with Test Mode do not count towards API billing and are not legally binding. Defaults to false

template_idstring uuid

Use when you have to create a document from a single template. Either :template_id or :template_ids must be present in the request, not both.

template_idsstring[]

Use when you have to create a document from multiple templates. Either :template_id or :template_ids must be present in the request, not both.

namestring

The name of the document.

subjectstring

Email subject for the signature request that recipients will see. Defaults to the default system subject or a template subject (if the document is created from a template).

messagestring

Email message for the signature request that recipients will see. Defaults to the default system message or a template message (if the document is created from a template).

exclude_placeholdersstring[]

Exclude one or more template placeholders when creating a document from a template. Any excluded placeholders (and their associated recipients and fields) will not be included on the created document. Values must match placeholder names on the template. You can't exclude all placeholders (at least one recipient must remain).

draftboolean

Whether the document can still be updated before sending a signature request. If set to false the document is sent for signing as part of this request. Defaults to false.

with_signature_pageboolean

When set to true the document will have a signature page added to the end, and all signers will be required to add their signature on that page.

expires_ininteger

Number of days before the signature request expires. Defaults to the account expiration setting or template expiration (if the document is created from a template).

remindersboolean

Whether to send signing reminders to recipients. Reminders are sent on day 3, day 6, and day 10 if set to true. Defaults to true.

apply_signing_orderboolean

When set to true recipients will sign one at a time in the order of the recipients collection of this request.

api_application_idstring uuid

Unique identifier for API Application settings to use. API Applications are optional and mainly used when isolating OAuth apps or for more control over embedded API settings

embedded_signingboolean

When set to true it enables embedded signing in your website/web application. Embedded functionality works with an iFrame and email authentication is disabled. :embedded_signinig defaults to false.

embedded_signing_notificationsboolean

On embedding signing, document owners (and CC'd contacts) do not get a notification email when documents have been completed. Setting this param to true will send out those final completed notifications. Default is false

text_tagsboolean

An alternative way (if you can’t use the recommended way) of placing fields in specific locations of your document by using special text tags. Useful when changing the content of your files changes the location of fields. See API documentation for “Text Tags” for details. Defaults to false.

custom_requester_namestring

Sets the custom requester name for the document. When set, this is the name used for all email communications, signing notifications, and in the audit file.

custom_requester_emailstring email

Sets the custom requester email for the document. When set, this is the email used for all email communications, signing notifications, and in the audit file.

redirect_urlstring url

A URL that recipients are redirected to after successfully signing a document.

allow_declineboolean

Whether to allow recipients the option to decline signing a document. If multiple signers are involved in a document, any single recipient can cancel the entire document signing process by declining to sign.

allow_reassignboolean

In some cases a signer is not the right person to sign and may need to reassign their signing responsibilities to another person. This feature allows them to reassign the document to someone else.

decline_redirect_urlstring url

A URL that recipients are redirected to if the document is declined.

languagestring

Sets the language for all recipients on the document and updates all recipient side interactions including the document email and the document itself. Accepted languages: English, Français, Español, Deutsch, Polski, Português, Dansk, Nederlands, Italiano, Русский, Svenska, العربية, Ελληνικά, Türkçe, Slovenčina. Defaults to English. Language should be sent in ISO 639-1 format: en, fr, es, de, pl, pt, da, nl, it, ru, sv, ar, el, tr, sk.

conditional_rules_mode'replace' | 'append' | 'none'

When creating a document from a template, controls how the conditional_rules in the request reconcile with the template's inherited rules: replace (drop inherited, use the body's rules), append (keep inherited, add the body's rules), or none (clear all rules). Required when sending conditional_rules that should not simply inherit.

metadataobject

Optional key-value data that can be associated with the document. If set, will be available every time the document data is returned.

Example request

{
  "recipients": [
    {
      "email": "signer@example.com"
    }
  ]
}

Response

created

test_modeboolean required
idstring required
template_idstring
template_idsstring[]
api_application_idstring uuid nullable
requester_email_addressstring email
custom_requester_namestring nullable
custom_requester_emailstring email nullable
namestring
subjectstring
messagestring
metadataobject nullable
created_atstring date-time
updated_atstring date-time
statusstring

Possible values: Draft, Created, Sending, Sent, Pending, Viewed, Completed, Manually completed, Declined, Canceled, Bounced, Blocked, Error, Expired

remindersboolean
archivedboolean
embedded_signingboolean
embedded_edit_urlstring url
embedded_preview_urlstring url nullable
apply_signing_orderboolean
redirect_urlstring url nullable
decline_redirect_urlstring url nullable
languagestring
expires_ininteger
decline_messagestring nullable
error_messagestring nullable
embedded_signing_notificationsboolean
allow_declineboolean nullable
allow_reassignboolean nullable