Endpoints reserved for Cloudflare workers (signature-orchestrator, etc.).
These endpoints use API key authentication (X-API-Key) instead of
JWT Bearer tokens. They allow workers to:
- Update individual signature statuses
- Finalize signature documents
- Synchronize state between workers and the database
Complete an individual signature (Worker)
Updates the status of an individual signature_request as "COMPLETED" in the database.
Usage
This endpoint is called by the signature-orchestrator (Cloudflare worker) when an individual signer has completed their signature. It synchronizes the signature state in the database in real time.
Signature flow
- A signer completes their signature in the signature-orchestrator
- The signature-orchestrator calls this endpoint to update the database
- The corresponding signature_request is updated with
COMPLETEDstatus - If all signers have completed, the signature-orchestrator calls
/finalize
Authentication
This endpoint uses an API key (X-API-Key) instead of a JWT Bearer token.
Only authorized workers can call this endpoint.
Benefits
- Real-time traceability: Each signature is recorded upon completion
- Consistent state: The database reflects the actual state at each step
- Robustness: If the process fails, already completed signatures are saved
- Visibility: The state of each individual signature can be viewed
Prerequisites
- The signature document must exist
- A signature_request must exist for this document and this signer_type
- The tenant_id must be provided in the
X-Tenant-IDheader
path Parameters
document_signature_idSignature document ID
signer_typeSigner type that has completed their signature
Complete an individual signature (Worker) › Request Body
signature_hashSignature hash for traceability (optional)
Complete an individual signature (Worker) › Responses
Signature request completed successfully
successIndicates whether the completion succeeded
messageConfirmation message
document_signature_idSignature document ID
signer_typeType of the signer who completed their signature
signature_request_idUpdated signature_request ID
Finalize a signature document (Worker)
Finalizes a signature document and activates the lease if all signatures are complete.
Usage
This endpoint is called by the signature-orchestrator (Cloudflare worker) when all signers have completed their signatures. It verifies that all signature_requests are complete and activates the lease if so.
Finalization flow
- All signers have completed their signatures (via
/complete/{signer_type}) - The signature-orchestrator calls this endpoint to finalize the document
- The system verifies that all signature_requests are in
COMPLETEDstatus - If all are complete:
- The document is marked as
COMPLETED - The lease changes to
ACTIVEstatus - A finalization event is published
- The document is marked as
- If some signatures are not complete, the document is marked as
COMPLETEDbut the lease remains inPENDING_SIGNATURE
Authentication
This endpoint uses an API key (X-API-Key) instead of a JWT Bearer token.
Only authorized workers can call this endpoint.
Important note
The signature_requests must be updated individually via /complete/{signer_type}
before calling this endpoint. This endpoint does not update the signature_requests, it only
verifies them.
Prerequisites
- The signature document must exist
- All signature_requests must be in
COMPLETEDstatus (updated individually) - The tenant_id must be provided in the
X-Tenant-IDheader - The final signed PDF URL must be provided
path Parameters
document_signature_idSignature document ID to finalize
Finalize a signature document (Worker) › Request Body
signed_pdf_urlURL of the final signed PDF (containing all signatures)
archive_urlURL of the archived PDF with timestamping (optional)
Finalize a signature document (Worker) › Responses
Signature document finalized successfully
successIndicates whether the finalization succeeded
messageConfirmation message
document_signature_idFinalized signature document ID