Documents
Documents are the core entity of DocuNinja. A document contains one or more files (PDF, DOCX, images), invitations (signatories), and signing fields.
Document lifecycle:
| status_id | Status | Description |
|---|---|---|
| 1 | Draft | Document is being prepared |
| 2 | Pending Approval | Awaiting internal approval before sending |
| 3 | Approved | Approved and ready to send |
| 4 | Rejected | Internal approval was rejected |
| 5 | Sent | Sent to signatories for signing |
| 6 | Completed | All signatories have signed |
| 7 | Expired | Signing deadline has passed |
| 8 | Voided | Manually voided by the owner |
Typical workflow:
- Create a document (
POST /documents) - Upload files (
POST /documents/{id}/upload) - Invite signatories (
POST /documents/{id}/invite) - Send for signing (
POST /documents/{id}/send) - Signatories sign (
POST /documents/{id}/{invitation}/sign) - Download completed document (
POST /documents/{id}/download)
📄️ List documents
Retrieve a paginated list of documents. Supports filtering by status,
📄️ Create document
Create a new document. The `description` field is required (minimum 3
📄️ Show document
Retrieve a single document by UUID, including its files, invitations,
📄️ Update document
Update a document's description, files, or expiration date.
📄️ Partially update document
Update specific fields of a document without replacing the entire resource.
📄️ Delete document
Archive a document. The document can be restored later using the
📄️ Bulk action on documents
Perform a bulk action on multiple documents at once.
📄️ Execute action on document
Perform a state-changing action on a document.
📄️ Reset document
Reset a document back to **Draft** status (status_id: 1). This clears
📄️ Upload file(s) to document
Upload one or more files to an existing document.
📄️ Reorder document files and signatories
Reorder the files within a document and/or the signatory order.
📄️ Invite signatories to document
Add signatories (contacts and/or users) to a document. Contacts are
📄️ Remove invitation from document
Remove a signatory invitation from a document. This is only allowed
📄️ Send document for signing
Send the document to all invited signatories. This triggers signing
📄️ Download document
Download the document as a PDF. For completed documents, this returns
📄️ Get document audit log
Generate and download the audit log (certificate of completion) for a
📄️ Get document timeline
Retrieve the activity timeline for a document, showing events such as
📄️ Import from Google Drive
Import a file from Google Drive into an existing document. Requires a
📄️ List document files
Retrieve all files attached to a document. Pass `includeUrl=true` to
📄️ Add file to document
Upload a single file to a document.
📄️ Rename a document file
Change the display filename of a specific file within a document.
📄️ Show document file
Retrieve metadata for a specific file within a document.
📄️ Update document file
Update a document file's metadata (e.g. filename).
📄️ Partially update document file
Partially update a document file's metadata.
📄️ Delete document file
Remove a file from a document. The file can be restored later.
📄️ Sign document
Submit signing data for a specific invitation. The request body contains
📄️ Hash-sign document
Sign a document using a pre-computed hash signature. This is an