Overview
1
Create a signature request from a template
2
Generate a signing URL and embed it
3
Detect completion via events or status
4
Download the signed envelope
1. Create a signature request
A signature request needs atemplateId, a signer, and a sender. See Manage templates to create a template first.
Response
Prefill fields
To fill in values before the signer opens the document, pass afields array. Each entry references a fieldId from the template and the value to set.
Field IDs come from the template. Open the template’s editor URL to place fields and find their IDs. A
fieldId that doesn’t exist on the template returns a 400.Test mode
While integrating, settestMode: true so the request doesn’t count toward billing.
2. Generate a signing URL
Create a signing URL for the signature request and embed it in your product. The URL expires one hour after creation, so generate it right before displaying it.Response
3. Detect completion
You have two ways to know when the signer is done:Poll the signature request status
Poll the signature request status
Fetch the signature request and check
status. It moves from Created to Completed.Read the event stream
Read the event stream
Fetch signature request events for a chronological history of what happened, including sending and completion.
4. Download the signed envelope
Once the document isCompleted, retrieve a presigned URL to download the signed PDF.
Response
Requesting the signed envelope before signing is complete returns
409 with "Envelope has not been signed yet".