Skip to content
Start free

Signature Requests

Open in ClaudeOpen in ChatGPT

Collect legally binding electronic signatures

Section titled “Collect legally binding electronic signatures”

Create a signature request to collect UETA and ESIGN compliant electronic signatures.

When you make an API request to fill out a PDF, you can specify that some fields must be filled in by certain people (including signature or initials fields). The PDF submission will be in a pending state until all of its signature requests have been completed. DocSpring emails each person a link to sign, or you can send them the links yourself, or embed the form on your own website. When everyone has filled in the form, the PDF will be generated, DocSpring emails it to the people who signed, and we can send your server a webhook notification.

Signature requests work with every template type. On a PDF template, signers fill in and sign the fields on the template’s pages. An HTML template, a Word template or a page design has no pages until its document is made, so DocSpring makes the document first: see HTML templates, Word templates and page designs.

To collect UETA and ESIGN compliant electronic signatures, DocSpring must record an audit trail that includes user authentication. This means that you need to send us some details about how and when your users have been authenticated.

When DocSpring sends the emails (the default):

  1. Create a submission with signature requests: the people who fill in and sign the document, and optionally the order they sign in, a message and reminders. See Emails from DocSpring.
  2. DocSpring emails each person a link to its signing page, and reminds them if you asked it to.
  3. Each person signs on the signing page.
  4. DocSpring generates the PDF and emails it to the people who signed and to any CCs. Your server gets webhook notifications along the way.

When you send the links yourself or embed the form in your app, create the signature requests with send_email: false:

  1. Create a submission with signature requests: include details about the people who will be filling out and signing the document, and how your app authenticated them.
  2. Send notification emails: send your users links to the signing form and record the event.
  3. Request authentication tokens: create a token when the user is ready to sign.
  4. Update authentication details: make sure the authentication information is current.
  5. Render the signing form: embed the form on your website or use the hosted signing page.
  6. Process the completed PDF: receive webhook notifications when all signatures are collected.

This process ensures that DocSpring can record a complete audit trail of events, making all electronic signatures legally binding.

A signed PDF never has editable form fields, so nobody can change a value after it was signed. When a signature request asks someone to sign or initial, every field in the final PDF is static, even if the submission sets editable: true or the template generates editable PDFs (Editable PDFs). Signature requests that only collect values keep the PDF’s editable form fields.

HTML Templates, Word Templates and Page Designs

Section titled “HTML Templates, Word Templates and Page Designs”

DocSpring makes the document when you create the signature requests, with the data you send. Signers read that document and fill in its form fields. Once everyone has signed, DocSpring fills in their values on the same document, without making it again, so each person signs what they read. It’s always a PDF.

Signers fill in the template’s form fields:

Each form field has a field on the template’s field list, which DocSpring adds when you save the template. If you delete the field from the list, submissions and previews fail with a message that names it.

A form field that no signer fills in prints its value from data.

A required form field must be in the document. When an {% if %} or a section’s condition leaves one out for the data you send, the submission fails with a message that names it, because its signer couldn’t finish without it. Turn off the field’s Required setting in the field list when the data can leave it out. A tag’s or element’s required only sets the field when it’s added to the field list: after that, the field’s Required setting decides, and changing required doesn’t change it. A field that a show/hide rule hides for this data doesn’t count.

In a {% for %} loop or a repeating section, each item has its own field, and every item in the data needs its own when it’s required. Name the field after the loop’s variable, as in {% form_field room.initials, kind: initials %} inside {% for room in rooms %}. A signature request’s fields can list them one at a time, rooms/0/initials, or all together, rooms/~/initials. A list with no items has nothing to fill in.

A signer’s field is always a value in the data, wherever the template reads it from: an item of a sorted or filtered list ({% assign by_floor = rooms | sort: "floor" %}) is still that room, and a name set with a plain assign is still that field. A value the template makes itself, with capture or a filter such as upcase, isn’t a field, so no signer can fill it in. A form field on an item of a sorted or filtered list needs the item to be an object ({% form_field room.initials %}): for a list of plain values, loop over the list itself.

Give the fields to signers with each signature request’s fields, or with the template’s signer roles: a tag’s or element’s role gives a form field to one of them, and role: sender means data fills it in. A submission’s only signature request can leave out fields, and gets every field without a role that data doesn’t fill in.

The document doesn’t change once it’s made

Section titled “The document doesn’t change once it’s made”

Nothing that a signer fills in can change the rest of the document. A show/hide rule can read the data you send, and decide which form fields are drawn and required, but creating a signature request is a 422 when a rule reads a field that a signer fills in on the document.

For the same reason, a signer can’t fill in a form field whose value the text uses too, such as {{ tenant_name }} beside {% form_field tenant_name %}: the text would stay empty next to the name they typed. Creating the signature request is a 422 that names the field. Send the field in data, which fills in both, or use it in one place.

Asking a signer for a value the document uses

Section titled “Asking a signer for a value the document uses”

The text of a document can use a value outside a form field, such as {{ address }}. That value has to be there when the document is made, so send it in data, or use a form field instead.

The signer who signs first can also be asked for it, by listing the field in their fields. That’s a submission’s only signer, or with signing_order: sequential, the only signer in the first signing_step. Listing it for anyone else is a 422.

  1. When they open their link, the signing page asks for those values, on a form with only those fields.
  2. DocSpring makes the document with their answers, usually in a few seconds. Until then, nobody can open it.
  3. They read the document and sign it. The Change answers button takes them back to the form, and the document is made again with their new answers. It can be made 5 times in all, and never once someone has signed.

An HTML template with Escape HTML in Data turned off prints its data as HTML, so its signers can’t be asked for these values: creating the signature request is a 422 that names the field. Turn the setting on, send the value in data, or give the field the Sender role.

The same goes for a value the template prints with the raw filter, which prints HTML as it is: a signer can’t be asked for it. Remove the filter from that value, send it in data, or give the field the Sender role.

A date they answer reaches the template as YYYY-MM-DD. To print it another way, use the date filter: {{ start_date | date: "%B %-d, %Y" }}.

Creating the signature requests returns straight away, and DocSpring makes the document in the background, usually in a few seconds. Until it’s ready, a signing link or an embedded signing form shows that the document is being prepared and opens it once it’s there, and DocSpring sends its emails to signers only then.

If the document can’t be made (a Liquid error, a required form field that the data leaves out, one of the limits below), the submission’s state is error, its error_message says why, and the submission.failed webhook is sent. Nobody can sign it: fix the template or the data and create a new submission.

  • The document can have up to 100 pages and 1,000 form fields for signers.
  • Each form field is in the document once. One in a header, a footer or a table’s repeated header row would be on every page, and one taller than the space left on its page would be split in two: both fail the submission with a message that names the field. Signature, initials and date signed fields can’t go in a page design’s header or footer.
  • Signers fill in text, dates, numbers, check boxes, radio buttons, drop-down lists, signatures and initials. They can’t fill in image fields.
  • The signed document is always a PDF that can’t be edited. A Word template’s output_format of docx or odt and editable: true are refused with signature requests.

A signer can choose not to sign by clicking the Decline button in the form header. The button is shown on the signing page that a signature request token’s signature_request_url opens (data_request_url in API v1), and when you embed the signing form with Signature Requests JS version 2.4.0 or above (older versions don’t show it). In an embedded form, you can hide the button with the showDecline: false option, or rename it with the declineButtonLabel option (for example, "Cancel - Do Not Sign").

Declining can’t be undone:

  • The signature request moves to the declined state, and a decline_request event is recorded with the signer’s IP address and browser.
  • The entire submission is cancelled. It moves to the declined state and no PDF is generated, even if other signers have already signed.
  • DocSpring sends the submission.declined and submission_data_request.declined webhook events. Webhooks created with API v2 receive the second one as signature_request.declined.

Once a submission has been declined, its remaining signature requests can no longer be opened or signed.

If you read submissions or signature requests with a DocSpring API client, upgrade it to the latest version. Older versions of the Ruby, Python, PHP, Java and C# clients raise an error when they read the declined state.

The final live PDF costs its own generation credits plus 60 credits for each signature request. There is no separate charge for creating a request, issuing access tokens, recording events, or generating previews. Watermarked test submissions are free, and they’re deleted after 30 days at the latest.

To ensure legal compliance, signature requests should include:

  • The user’s name and email address. Both are optional, but we recommend including them because they are shown on the audit trail.
  • Details about how and when the user was authenticated (auth_type is required)
  • The fields that the user must fill out (including signature or initials fields)
  • Optional metadata to save on the signature request

DocSpring automatically records a complete audit trail for each signature request, including:

  • When DocSpring emailed the signing link or a reminder, and when that email bounced or was marked as spam.
  • When you sent the signing link yourself, which you report through the Create Signature Request Event API. The audit trail shows it as reported by your account.
  • How and when each signer was authenticated, in a Signer Authentication section. These are the details you sent, shown as reported by your account. When a signer opens an email link, DocSpring records the time itself, and when the link was one DocSpring emailed, the section says DocSpring sent it to the signer’s address.
  • When the document was viewed
  • When each signature was collected
  • When the document was completed

The certificate also shows the document’s Document SHA-256, the hash of the document before the certificate and any password were added, and an Audit trail hash of the certificate’s details and events.

Keep the signed PDF, the audit trail and the hash manifest yourself: Signing evidence and retention says what’s deleted when a signed document expires and what stays. How DocSpring signing works describes the evidence and how a document can be verified later.

Example audit trail log:

2024-01-01 12:00:00 - Reported by Acme Inc via API: sent a signing link by email to test@example.com, at 2024-01-01 11:59:30 UTC
2024-01-01 12:10:00 - Viewed by Test (test@example.com)
2024-01-01 12:20:00 - Signed by Test (test@example.com)
2024-01-01 12:20:00 - Document completed

The signing page, DocSpring’s emails to your signers and the audit trail show your account’s logo, and the signing page and emails use your brand color for their buttons. Set them in the Logo and Brand color fields on the Account page. They show when your account is on a paid plan or has bought a credit pack. On the signing page, the logo shows when the page is opened from its link, not when you embed the form on your own site.

Authentication tokens authorize a user to access and sign a specific signature request. Key characteristics:

  • Its link opens the signing form for 24 hours (api tokens, the default) or 7 days (email tokens, for links you send by email). A form that opened in time keeps working for 7 more days, so the person can finish it later. After that, the page says the link has expired and to ask the sender for a new one.
  • Can’t be created once the signature request is finished (completed, declined, or expired). The API returns an error, and the same applies to updating the signature request or adding events to it.
  • Should be requested immediately before showing the signing form
  • Include an authenticated URL for the hosted signing page

When an embedded form is displayed on a mobile device, it will always be shown in a full-screen modal overlay. The user can zoom in to enlarge the document and fields. You should use the following viewport meta tag in your HTML <head>:

<meta name="viewport" content="width=device-width, initial-scale=1" />