> **Source:** https://knowledge.leegality.com/document-execution/api/complete-document > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # POST /v4/packs/documents/complete — Complete document > **Info — Sandbox endpoint** > > `https://sandbox.leegality.com/api/v4/packs/documents/complete` Use this API to manually mark a document as complete. If this is the last incomplete document in the pack, the pack is automatically marked as completed. The document must have no pending invitee groups that still need to complete or be removed. Completing one document does not affect the other documents in the pack. **Authentication:** `Authorization: Bearer ` header required on every request. ## Request URL ``` POST https://app1.leegality.com/api/v4/packs/documents/complete ``` **Environments:** - Production: `https://app1.leegality.com/api/v4/packs/documents/complete` - Sandbox: `https://sandbox.leegality.com/api/v4/packs/documents/complete` --- ## Request Body **Content-Type:** `application/json` | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `documentId` | string | Yes | The document's ID — the ULID that identifies the document (from the pack's document details). **Required.** | `01KTXKANAE8DHKQYNJTXSDJKG5` | ### Sample Request ```json { "documentId": "01KTXKANAE8DHKQYNJTXSDJKG5" } ``` --- ## Responses ### 200 — Document marked as complete. Returns the document and pack status. **Error codes** The request is rejected if any of the following applies: | Scenario | Result | | --- | --- | | `documentId` missing, empty, null, an array, an object, or invalid JSON body | 400 `LE_ERR_AP_058` | | `documentId` not found, or not a valid document ULID | 404 `LE_ERR_AP_001` | | Document already completed | 409 `DOCUMENT_ALREADY_COMPLETED` | | Document still has active or pending invitations | 409 `ACTIVE_INVITATIONS_EXIST` | | Expired JWT | 401 `LE_ERR_AP_080` | | Missing auth token | 403 Access Denied | | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `data` | object | No | Response payload. See **data** below. | — | #### data Response payload. | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `packId` | string | No | Pack identifier. | `pack_xyz789` | | `documentId` | string | No | The ULID of the completed document. | `01HN8Z2K7M9P4Q5R6S7T8U9V0` | | `documentStatus` | string | No | Document status after this call. The usual value is `PACK_PENDING_COMPLETION` — the document is marked pending, and the pack moves to `COMPLETED` only once every document in it has finished. **Possible values:** - `UNSIGNED` - `PARTIALLY_SIGNED` - `PACK_PENDING_COMPLETION` - `COMPLETED` Allowed: `UNSIGNED`, `PARTIALLY_SIGNED`, `PACK_PENDING_COMPLETION`, `COMPLETED`. | `PACK_PENDING_COMPLETION` | | `completionType` | string | No | How the document was completed. Always `MANUAL` for this endpoint. | `MANUAL` | | `packStatus` | string | No | Current pack status — `COMPLETED` if all documents are now complete, otherwise `SENT`. | `SENT` | | `packCompletedAt` | string | No | Pack completion timestamp (ISO 8601) if this action completed the pack; otherwise `null`. | `null` | ### Sample Response (200) ```json { "data": { "packId": "pack_xyz789", "documentId": "01HN8Z2K7M9P4Q5R6S7T8U9V0", "documentStatus": "PACK_PENDING_COMPLETION", "completionType": "MANUAL", "packStatus": "SENT", "packCompletedAt": null } } ```