Doc E Sign API
website·Indexed 30 days ago
https://docs.doc-e-sign.comAn e-signature service that produces signed PDFs with a built-in, independently verifiable audit trail. The REST API (v1.0.0) allows developers to send documents for signature, manage envelopes, resend signing invitations, and verify documents via fingerprints or file uploads.
What's inside Doc E Sign
- Doc E Sign is an e-signature service that generates signed PDFs featuring a built-in, independently verifiable audit trail. The verification of these documents does not require a Doc E Sign account, an internet connection, or the continued existence of the Doc E Sign service. It is designed for developers needing cryptographic proof of document integrity, and for legal entities or counterparties requiring independent authenticity verification.
Doc E Sign API Overview
The Doc E Sign REST API (Version 1.0.0) provides programmatic access to the following core functionalities:
- Sending documents for signature
- Listing and retrieving envelopes
- Resending signing invitations
- Verifying document integrity
Understand Doc E Sign automatic signature field placement
Doc E Sign automatically places the signature field at the bottom of the last page of the uploaded document. To ensure the signature block lands in the intended location, the signature section must be the final page of the PDF.Understand the signer's experience
Signers receive an email link that directs them to a signing page compatible with desktop and mobile. No account creation or software installation is required. The signer must:
- Review the document
- Accept the signing consent notice
- Type their name as a signature
- Submit the document
Authenticate Doc E Sign API requests using a Session Cookie
For interactive testing or use with the Sandbox, you can use a session cookie. Sign in to the platform and retrieve thesb-access-tokenfrom the browser's DevTools (Application → Cookies), then pass it in the Cookie header.curl https://doc-e-sign.com/api/v1/envelopes \ -H "Cookie: sb-access-token=<your-session-cookie>"Prepare existing PDF documents for signature placement
For non-programmatic documents, manually move the signature block to the last page before uploading to Doc E Sign:
- Word / Google Docs: Cut the signature section and paste it at the end of the document before exporting to PDF.
- Adobe Acrobat: Use 'Organise Pages' to drag the signature page to the last position.
- macOS Preview: Use the sidebar to drag the signature page to the last position.
Upload a document for signature
From the dashboard, click New envelope to upload a document. Doc E Sign supports PDF files up to 20 MB. Other formats (such as Word or Google Docs) must be exported to PDF before uploading.
Signature Field Placement: In the current version, the signature field is automatically placed at the bottom of the last page. For specific placement, documents must be structured according to the 'Preparing documents for signing' guidelines.
Verify a signed PDF using Doc E Sign
Doc E Sign PDFs can be verified using two methods:
1. Online Verification (Recommended) Visit
doc-e-sign.com/verifyand upload the signed PDF. This method uses a secret held by Doc E Sign to confirm that the file's bytes match the records and that the fingerprints were genuinely produced by Doc E Sign.2. Offline Verification Verification can be performed using only the PDF itself without an internet connection or Doc E Sign account. This confirms that the numbers on the audit page are internally consistent and that the document has not been altered since sealing. However, it cannot prove the fingerprints were originally generated by Doc E Sign since it uses no secret.
Create a Doc E Sign account
To sign up for Doc E Sign, visit doc-e-sign.com/sign-in and enter your email address. The system uses passwordless authentication by sending a sign-in link to your email, which grants access to your dashboard.Access and authenticate with the Doc E Sign sandbox
The Doc E Sign sandbox is a staging environment located at
staging.doc-e-sign.com. It allows developers to test the full signing flow without affecting production data. There are two ways to authenticate requests to the sandbox API:- Session Cookie (Quick Start): Sign in at
staging.doc-e-sign.com/sign-inusing a real email address. Open browser DevTools → Application → Cookies →staging.doc-e-sign.comand copy the value of thesb-access-tokencookie. This token expires after one hour. - API Key (Long-term): Once signed in to the staging environment, navigate to Settings → API key to generate a sandbox-specific key. Pass this key in the request header as
Authorization: Bearer des_live_.... Note that sandbox keys only work against the staging URL.
- Session Cookie (Quick Start): Sign in at
Verify Doc E Sign documents offline using the hash chain algorithm
The offline verification algorithm confirms that a signed PDF and its audit page are internally self-consistent and that nothing has been altered since sealing. It requires only the signed PDF and a SHA-256 implementation.
Important Security Note: This algorithm proves internal consistency but does not prove genuine provenance (that the document was actually produced by Doc E Sign), as it requires no secret. To confirm genuine provenance, use the online verification service.
The Algorithm Steps:
- Read
pre_audit_byte_length(integer) from the audit page. - Extract bytes from the PDF from index
0topre_audit_byte_length - 1→signed_pdf_bytes. - Compute
sealed_pdf_hash = lowercase_hex(SHA-256(signed_pdf_bytes)). - Set
H = Original document fingerprint(from the audit page). - For each event in the event log (in order):
- If
event_typeis "completed", setpayload = sealed_pdf_hash(the value computed in step 3). - Otherwise, set
payloadto the value printed in the audit page event log. - Update
H = lowercase_hex(SHA-256(H + "|" + event_type + "|" + timestamp + "|" + payload)).
- If
- Assert that the final
Hequals theSigning chain fingerprintprinted on the audit page.
If the assertion passes, the document is unaltered and the event log is complete.
- Read
Configure signer details and send invitation
To send a document, provide the signer's email address and a document title (which appears in the invitation email). You can set an expiration date for the signing link; the default is 5 days. Once the link expires, the signer can no longer complete the process.