Signatures API
API endpoints for DigiSigner digital signature workflows, including signature requests, status tracking, and webhook handling. Base Path:/api (signature endpoints in main routes)Code Reference:
app/services/signature_service.py, app/api/routes.py (signature endpoints)
Signature Requests
Request Document Signature
Request signatures for a document via DigiSigner. Request Body:app/api/routes.py (request_document_signature)
Signature Status
Get Document Signatures
Get all signature requests for a document. Response:Get Signature Details
Get detailed information about a specific signature request. Response: Complete signature request details including signer statusSigned Documents
Download Signed Document
Download the signed document. Response: File download (PDF) Code Reference:app/api/routes.py (download_signed_document)
Webhook Endpoint
DigiSigner Webhook
DigiSigner webhook endpoint for signature status updates. Events Handled:DOCUMENT_SIGNED: Individual signer signedSIGNATURE_REQUEST_COMPLETED: All signers completed
app/api/routes.py (digisigner_webhook)
Signature Status Values
pending: Signature request created, awaiting signersin_progress: Some signers have signed, others pendingcompleted: All signers have completed signingdeclined: One or more signers declined to signexpired: Signature request expired
app/db/models.py (DocumentSignature model)
Error Responses
400 Bad Request
- Invalid signer email addresses
- Missing required fields
- Document file not found
404 Not Found
- Document not found
- Signature request not found
500 Internal Server Error
- DigiSigner API error
- Document upload failure
- Webhook processing error
Configuration
Environment Variables
DigiSigner API key
DigiSigner API base URL. Default:
https://api.digisigner.com/v1Webhook secret for signature verification (optional but recommended)
Webhook Security
Signature Verification (Recommended)
For production, implement webhook signature verification:- Get webhook secret from DigiSigner account settings
- Implement HMAC signature verification
- Compare signature in
X-DigiSigner-Signatureheader - Reject requests with invalid signatures
Additional Resources
Last Updated: 2026-01-14
Code Reference:
app/services/signature_service.py, app/api/routes.py