Document Signing Workflow
DokStamp supports a three-party signature workflow: a document can be signed by external third parties (via email link) and/or signed institutionally using a digital certificate stored in the platform.Overview
Step-by-step
1 — Create a Document Type
Document types define the template for a category of documents, including the indexer fields (metadata fields for classification).indexers array defines custom metadata fields for documents of this type. The rule field validates the input: "Outro" (any text), "CPF" (Brazilian tax ID), "E-mail" (email address).
2 — Upload the PDF
uuid as file_uuid.
3 — Create the Document
4 — Register the Signer
Signers are third-party individuals who need to sign the document. They are identified by name, email, and CPF (Brazilian tax ID).GET /signers?where[user][email]=carlos@acme.com first to avoid creating duplicate records.
5 — Link the Signer to the Document
This step both links the signer and triggers the signature request email automatically. This endpoint is public — noAuthorization header is required.
6 — Check Signature Status
Poll the document detail endpoint to check whether all signatures have been collected:signatures array in the response shows the status of each signer:
"signed": true means the signer has completed their signature. false means pending.
7 — Sign Institutionally
Once third-party signatures are collected, sign the document with the institution’s digital certificate:cert_id refers to the institutional digital certificate configured in the platform. The pin is the certificate’s PIN protection code.
8 — Download the Signed PDF
Batch operations
For high-volume scenarios, batch endpoints are available:| Endpoint | Purpose |
|---|---|
POST /documents/signatures/batch/resend | Resend signature request emails to multiple signers |
POST /documents/batch/sign/{cert_id} | Sign multiple documents at once with the institutional certificate |