> **Source:** https://knowledge.leegality.com/document-execution/api/esign-docsigner-invitation > **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 /v3.0/sign/docSigner/invitation — eSign DocSigner invitation Signs an invitation configured with the **Document Signer Certificate** (DocSigner) sign type via API. **Authentication:** `X-Auth-Token` header required on every request. ## Request URL ``` POST https://app1.leegality.com/api/v3.0/sign/docSigner/invitation ``` **Environments:** - Production: `https://app1.leegality.com/api/v3.0/sign/docSigner/invitation` - Sandbox: `https://sandbox.leegality.com/api/v3.0/sign/docSigner/invitation` --- ## Request Body **Content-Type:** `application/json` Request body for the eSign DocSigner Invitation API. | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `signUrl` | string | Yes | The sign URL (invitation URL) of the invitation to eSign. The invitation must have DocSigner as the allowed signature type, must be active, and must be unsigned. The sign URL is returned in the Create eSigning Request API response. > **Note:** The auth token must belong to the **invitee's account**. If the auth token belongs to a different account (e.g., the sender's account but the invitee is a different user), the API returns `invitation.not.exists`. | `https://sandbox.leegality.com/sign/6069cd1e-961f-47b1-bd27-a` | | `profileId` | string | Yes | The unique identifier of the DocSigner profile saved in the invitee's Leegality dashboard. **How to find it:** Log into the signer's dashboard and navigate to: Settings > eSignature & Seal > Document Signer Certificate This can be any valid DocSigner profile — whether hosted on Leegality's server or the client's own server. | `d4NrfHV` | | `consent` | string | Yes | The exact consent string required to authorize the eSigning. You must pass this string **exactly as shown** — any changes (including case, spacing, or punctuation) will result in an `invalid.consent` error. **Required value:** `By using this authenticated API and the ProfileID associated with this Document Signer Certificate, I agree that the Document Signer Certificate saved in this Account will be used to eSign documents for me. I also understand that recipients of such electronic documents will be able to see my signing details.` | `By using this authenticated API and the ProfileID associated` | ### Sample Request ```json { "signUrl": "https://sandbox.leegality.com/sign/6069cd1e-961f-47b1-bd27-ac7ba1d7363c", "profileId": "d4NrfHV", "consent": "By using this authenticated API and the ProfileID associated with this Document Signer Certificate, I agree that the Document Signer Certificate saved in this Account will be used to eSign documents for me. I also understand that recipients of such electronic documents will be able to see my signing details." } ``` --- ## Responses ### 200 — Default Response Response for the eSign DocSigner Invitation API. | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `status` | integer | No | API response status. `1` = Success — the document has been signed with the DocSigner certificate `0` = Failure — check the `messages` array for error details | `1` | | `data` | object | No | Empty object `{}` for both success and error responses. | `[object Object]` | | `messages` | array\ | No | Array of messages. Unlike most other APIs, this field contains a message on **both success and failure**. **Success code:** - `signing.success` — The document has been signed successfully **Error codes:** - `invitation.not.exists` — The invitation was not found. This can mean: - The sign URL is invalid or does not exist - The invitation is not a DocSigner type - The invitation has already been signed - The invitation has expired or the document is completed - The auth token does not belong to the invitee's account - `invalid.consent` — The consent string does not match the required exact text - `profile.not.exists` — The DocSigner profile ID is invalid or not found in the invitee's account See **Message** below. | — | #### Message Message object containing a machine-readable code and a human-readable description. Used for success confirmations, errors, and warnings. | Field | Type | Required | Description | Example | |-------|------|----------|-------------|---------| | `code` | string | No | Response message code. | `simpleWorkFlow.success` | | `message` | string | No | Human-readable success or error message. | `Invitations sent successfully.` | ### Sample Response (200) ```json { "status": 1, "data": {}, "messages": [ { "code": "simpleWorkFlow.success", "message": "Invitations sent successfully." } ] } ```