> **Source:** https://knowledge.leegality.com/document-execution/api/docsigner-esign > **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/docsign — DocSigner eSign :::info[Sandbox endpoint] **Authentication:** `X-Auth-Token` header required on every request. ## Request URL ``` POST https://app1.leegality.com/api/v4/packs/docsign ``` **Environments:** - Production: `https://app1.leegality.com/api/v4/packs/docsign` - Sandbox: `https://sandbox.leegality.com/api/v4/packs/docsign` --- ## Request Body **Content-Type:** `application/json` | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `signUrl` | string | Yes | Sign URL of the invitation to sign — the invitation URL from [Check Pack Details](https://knowledge.leegality.com/document-execution/api/check-pack-details) (`invitations[].inviteeDetails[].invitationUrl`). The invitation must be configured for DocSigner signing. | `https://app1.leegality.com/sign/a1b2c3d4-e5f6-7890-abcd-ef12` | | `profileId` | string | Yes | DocSigner profile ID from the Leegality dashboard. The profile must belong to your account. | `01KT8RH0AUTOMATEDSIGNPROF99` | | `consent` | string | No | Consent text recorded with the signature. | `I agree` | ### Sample Request ```json { "signUrl": "https://app1.leegality.com/sign/a1b2c3d4-e5f6-7890-abcd-ef1234567890", "profileId": "01KT8RH0AUTOMATEDSIGNPROF99", "consent": "I agree" } ``` --- ## Responses ### 200 — Invitation signed. **Error codes** The request is rejected if any of the following applies: | Scenario | Error code | | --- | --- | | No invitation found for this `signUrl` | `LE_ERR_AP_016` | | Missing or blank `profileId` | `LE_ERR_AP_031` | | Invitation is not configured for DocSigner | `LE_ERR_AP_032` | | Invitation has already been signed | `LE_ERR_AP_033` | | Invitation has been rejected | `LE_ERR_AP_034` | | Invitation is not active yet (earlier signers in the signing order haven't finished) | `LE_ERR_AP_035` | | DocSigner profile not found or not owned by your account | `LE_ERR_AP_036` | | Another signing request for this invitation is in progress — retry shortly | `LE_ERR_AP_037` | | Missing or malformed body / blank `signUrl` | `LE_ERR_AP_059` | | Expired token (401) | `LE_ERR_AP_080` | | Missing token (403) | `LE_ERR_AP_081` | | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `data` | object | No | Response payload. See **data** below. | — | #### data Response payload. | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `signUrl` | string | No | The invitation's sign URL that was signed. | `https://app1.leegality.com/sign/AbCdEf123456` | | `submittedAt` | string | No | When the signature was submitted. | `2026-06-05T16:00:00Z` | | `documentStatus` | string | No | The document's signing status after this call. | `SIGNED` | | `combinationResults` | array\ | No | Per-combination signing outcome. Present only when the pack has multiple combinations — one entry per combination. See **combinationResults** below. | — | ##### combinationResults | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `combinationUuid` | string | No | Identifier of the combination. | `6f1c2a8e-9b3d-4f2a-8a1c-2b7e0d4f9a11` | | `status` | string | No | Signing outcome for this combination. Possible values: - `SIGNED` — signed successfully. - `ALREADY_SIGNED` — the combination was already signed. - `FAILED` — signing failed; see `errorMessage`. Allowed: `SIGNED`, `ALREADY_SIGNED`, `FAILED`. | `SIGNED` | | `errorMessage` | string | No | Reason for failure. Present only when `status` is `FAILED`. | `null` | ### Sample Response (200) ```json { "data": { "signUrl": "https://app1.leegality.com/sign/AbCdEf123456", "submittedAt": "2026-06-05T16:00:00Z", "documentStatus": "SIGNED", "combinationResults": [ { "combinationUuid": "6f1c2a8e-9b3d-4f2a-8a1c-2b7e0d4f9a11", "status": "SIGNED", "errorMessage": null } ] } } ```