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.
Party signature types
While the document is in draft, each party can only have signature coordinates configured. The visible signature type is chosen by the party at signing time.Configure coordinates on create or update (draft only)
signature_typeandsignature_image_file_uuidare not accepted on this endpoint.- Confirmation only requires all parties to have valid coordinates.
Choose the type when signing
The party sends the type together with the security code on the public sign endpoint:application/json or multipart/form-data without a file:
signature_typeis required (stamporimage).signature_imageis required whensignature_typeisimage(PNG, JPEG, or WebP).signature_imagecannot be sent whensignature_typeisstamp.- The endpoint uploads the image internally;
POST /filesis not required.
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.