{
  "openapi": "3.0.0",
  "info": {
    "description": "Welcome to the Leegality Document Execution API documentation. This API lets you integrate Document Execution into your application. Use it to create signing requests, track document status, and retrieve signed documents and audit trails.\n\n## What can you do with this API?\n\n- **Create eSigning requests** \u2014 Send documents for signing via based on pre-configured workflow.\n- **Track status** \u2014 Check the entire document status or specific invitee details.\n- **Retrieve signed documents** \u2014 Download the signed PDF and audit trail once all invitees have signed.\n- **Real-time updates** \u2014 Use Webhooks to receive real-time notifications on signing events.\n\n## Environments\n\n| Environment | Dashboard | Base URL |\n|---|---|---|\n| Sandbox | https://sandbox-dashboard.leegality.com | `https://sandbox.leegality.com/api/` |\n| Production | https://dashboard.leegality.com | `https://app1.leegality.com/api/` |\n\n## Testing with Postman\n\nA Postman Collection is available with pre-configured requests for common scenarios: [Download Postman Collection](https://drive.google.com/file/d/1EpJItMuIQPMFKgtmjHmjs7JKGqs3I4Dl/view)\n\nImport the collection into Postman and add your Auth Token to begin testing.\n\n## Need Help?\n\nReach out to [support@leegality.com](mailto:support@leegality.com) for any questions about your integration. You can also review our [Terms of Service](https://leegality.com/tnc).",
    "version": "3.0",
    "title": "Document Execution API"
  },
  "servers": [
    {
      "url": "https://app1.leegality.com/api"
    },
    {
      "url": "https://sandbox.leegality.com/api"
    }
  ],
  "tags": [
    {
      "name": "Document",
      "description": "Core Document APIs for creating eSigning requests and retrieving document details."
    },
    {
      "name": "Invitation",
      "description": "APIs that operate on individual invitations (invitees) within a document. A document can have multiple invitations."
    },
    {
      "name": "Stamps",
      "description": "APIs for managing stamp paper series and inventory. Use these APIs to retrieve details about stamp papers, denominations, party names, and inventory status (used, unused, expired, etc.)."
    },
    {
      "name": "Wallet",
      "description": "APIs for checking eSign wallet balance and credit usage."
    },
    {
      "name": "NeSL",
      "description": "APIs for managing NeSL (National eSign Locker) transactions."
    },
    {
      "name": "Webhooks",
      "description": "Reference documentation for inbound webhook payloads sent by Leegality to your server when signing events occur."
    }
  ],
  "externalDocs": {
    "description": "Website",
    "url": "https://leegality.com"
  },
  "paths": {
    "/v3.0/sign/request": {
      "post": {
        "tags": [
          "Document"
        ],
        "operationId": "create-an-e-signing-request",
        "summary": "Create eSigning request",
        "description": "Creates a new eSigning request based on a published Workflow. Use this endpoint to run a workflow and send a document with pre-configured settings.\n\n:::info[Related Guides]\n- **[Learn to create workflow](https://knowledge.leegality.com/workflows/create-workflow)**\n- **[Download Workflow Request JSON Payload](https://knowledge.leegality.com/workflows/run-workflow?type=via-api)**\n:::",
        "responses": {
          "200": {
            "description": "eSigning request created. Check status in the response body \u2014 1 indicates success, 0 indicates a validation or configuration error. On success, the data object contains documentId, per-invitee signUrl, and expiryDate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignRequest"
              }
            }
          },
          "required": true
        }
      },
      "delete": {
        "tags": [
          "Document"
        ],
        "operationId": "delete-document",
        "summary": "Delete document",
        "description": "Permanently deletes a document and all associated data.\n\nThis operation is **irreversible**. Once deleted, the document cannot be recovered, and all GET APIs will return `no.document.found` for the deleted document ID.\n\n**What gets deleted**\n\n- The document PDF and all signed copies\n- Audit trail\n- All invitee/signer data and signing URLs\n- Webhook history for the document\n\n**Which documents can be deleted**\n\nDocuments in **any state** can be deleted: Active (not yet signed), Completed (fully signed), Rejected (signer rejected), Expired (invitation expired or verification failed), and Multi-signer documents (regardless of how many have signed).\n\n:::caution\nThis action is permanent and cannot be undone. Make sure you have downloaded any signed documents or audit trails before deleting.\n:::",
        "parameters": [
          {
            "name": "documentId",
            "in": "query",
            "description": "Unique identifier of the document to delete.\n\n**Format:** Alphanumeric string.\n\nGet from the **Create eSigning request** API response or from the dashboard.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete response. Check `status` field: `1` = success, `0` = failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteDocumentApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.2/sign/request": {
      "get": {
        "tags": [
          "Document"
        ],
        "operationId": "check-transaction-status",
        "summary": "Check transaction status",
        "description": "Returns a lightweight summary of a document's transaction status, including signing state, download URLs, and signer certificate data.\n\n**What this API returns:**\n- Document signing status (signed, rejected, expired)\n- CDN download URLs for the signed PDF and audit trail\n- Signer certificate data (name, pincode, state, title) for completed documents\n\n**Note:** The `signers` and `auditTrail` fields are only present in the response when the document has been signed. For unsigned, rejected, or expired documents, these fields are absent from the response (not null).\n\n**Note:** This API cannot retrieve data for documents that were deleted manually from the dashboard or automatically using the \"delete on complete\" option.\n\n**Important:** Fair use limits may apply to GET APIs to ensure system stability.",
        "parameters": [
          {
            "name": "documentId",
            "in": "query",
            "description": "Unique identifier of the document to check.\n\n**Format:** Alphanumeric string (e.g., `01KJCHZ1Z3XRFP04DPT195AJH6`).\n\nGet from the **Create eSigning request** API response or from the dashboard.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction status retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TransactionStatusApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/sign/request/reactivate": {
      "post": {
        "tags": [
          "Document"
        ],
        "operationId": "reactivate-document",
        "summary": "Reactivate document",
        "description": "Reactivates an expired document by resetting the expiry period, allowing invitees to sign again.\n\n**When to use**\n\nA document's invitation expires when the signing deadline passes without the invitee signing, or when certificate verification fails during signing (e.g., Aadhaar details mismatch, DSC details mismatch). In both cases, the invitation status becomes `expired: true`. Use this API to reset the expiry and reopen the signing window.\n\n**Setting the new expiry**\n\nYou can set the new expiry using either `expiryDays` or `expiryTime` (not both).\n\n`expiryDays` \u2014 Relative expiry in days: `-1` = 45 minutes from now, `0` = same day at 11:59 PM, `1` = next day at 11:59 PM, `5` = 5 days from now at 11:59 PM, `30` = 30 days from now at 11:59 PM.\n\n**Example**\n\nA document was sent for signing with certificate verification enabled. During signing, the signer's certificate details (e.g., name, gender, pincode, state) don't match the expected values configured in the workflow. Signing fails and the invitation expires (`expired: true`). After correcting the workflow configuration, reactivate the document:",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReactivateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Reactivation response. Check `status` field: `1` = success, `0` = failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactivateApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/sign/request/list": {
      "get": {
        "tags": [
          "Document"
        ],
        "operationId": "list-documents",
        "summary": "List documents",
        "description": "Search and list documents from your Leegality account with optional filters.\n\n**Note:** Deleted documents are excluded from search results.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Search query to find documents.\n\nSearches across:\n- **Document name** — the PDF filename\n- **Document ID** — the unique identifier returned by the Create eSigning Request API\n- **Internal Reference Number (IRN)** — set during document creation\n\nSearch is **case-insensitive** and matches the **exact full value**. Partial matches are not supported — for example, searching `01KGRZ2F` will not match `01KGRZ2F9YNZ828PYDYE29JYZS`.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter documents by status.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "DRAFT",
                "SENT",
                "RECEIVED",
                "SIGNED",
                "COMPLETED",
                "EXPIRED"
              ]
            }
          },
          {
            "name": "max",
            "in": "query",
            "description": "Maximum number of documents to return per page. Default: `20`. Maximum: `40`. Values above 40 are silently reset to 20.\n\nUse with `offset` for pagination. Example: for page 2 with 10 results per page, use `max=10&offset=10`.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 40
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of documents to skip before returning results. Default: `0`.\n\nUse with `max` for pagination. Example: for page 2 with 10 results per page, use `max=10&offset=10`.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of documents matching the search criteria.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDocumentsApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/sign/request/resend": {
      "post": {
        "tags": [
          "Invitation"
        ],
        "operationId": "resend-notifications",
        "summary": "Resend notifications",
        "description": "Resends signing invitation notifications (email/SMS) to invitees who have not yet signed.\n\n**How it works**\n\nPass an array of `signUrls` (1 to 15 URLs per request). Each sign URL is processed independently \u2014 valid ones succeed even if others fail. The top-level `status` is `1` as long as the request is valid, even if individual invitations fail. Check each item in the `invitations` array for per-invitee success/failure.\n\n**Resend limit**\n\nEach invitee has a **maximum of 5 resends**. After reaching this limit, further resend attempts for that sign URL will fail with an error message directing you to contact support.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Resend response with per-invitee status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResendApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.3/document/details": {
      "get": {
        "tags": [
          "Document"
        ],
        "summary": "Check document details",
        "description": "Returns in-depth details about a document. \n\nThe response is highly configurable \u2014 use the boolean query parameters to request only the data you need: signed file URLs, audit trail, signer details, workflow/template metadata, account/sender info, stamp details, NeSL data, and more. Fields that are not explicitly requested are omitted from the response entirely.\n\n:::warning[Deleted Documents]\nThis API cannot retrieve data for documents that were deleted manually from the dashboard or automatically using the delete on complete option.\n:::\n\n**Important:** Fair use limits may apply to GET APIs to ensure system stability.",
        "parameters": [
          {
            "name": "documentId",
            "in": "query",
            "description": "Unique document ID generated by Leegality. Get from the Create eSigning Request API response or from the dashboard.\n\n- **Format:** Alphanumeric string",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "file",
            "in": "query",
            "description": "Pass `true` to receive the signed PDF file as a CDN URL in the response.\n\n- **Validity:** CDN URL expires in **15 seconds** \u2014 download immediately at server level, not for browser preview.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "auditTrail",
            "in": "query",
            "description": "Pass `true` to receive the Audit Trail PDF as a CDN URL in the response. Only applicable to completed documents (all signatories have signed).\n\n- **Validity:** CDN URL expires in **15 seconds** \u2014 download immediately at server level, not for browser preview.\n- Audit trail for a deleted document can also be fetched.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "document_scheduledDeletionDate",
            "in": "query",
            "description": "Pass `true` to receive the scheduled document deletion date and time.\n\n Applicable when the \"Auto delete on complete\" is enabled in the **[Department > Document Security](/document-execution/settings/Department/document-security-settings)** setting or while sending the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "document_customMessage",
            "in": "query",
            "description": "Pass `true` to receive the custom message configured on the invitation email.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "document_deleteOnComplete",
            "in": "query",
            "description": "Pass `true` to receive whether auto-delete on complete was enabled for the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "document_requestSigningOrder",
            "in": "query",
            "description": "Pass `true` to receive whether signing links are activated sequentially.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "document_requireSigningOrder",
            "in": "query",
            "description": "Pass `true` to receive whether signing order was required for the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sftp",
            "in": "query",
            "description": "Pass `true` to receive whether SFTP was enabled for the document, and the SFTP server ID configured to receive the completed document and audit trail.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "workflow",
            "in": "query",
            "description": "Pass `true` to receive workflow ID associated with the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "workflow_name",
            "in": "query",
            "description": "Pass `true` to receive the workflow name.\n\n> **Note:** Requires `workflow=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "workflow_type",
            "in": "query",
            "description": "Pass `true` to receive the workflow type (PDF or Template).\n\n> **Note:** Requires `workflow=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "workflow_subType",
            "in": "query",
            "description": "Pass `true` to receive the workflow sub-type (Single PDF/template or Multiple PDF enabled).\n\n> **Note:** Requires `workflow=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "template",
            "in": "query",
            "description": "Pass `true` to receive template ID associated with the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "template_name",
            "in": "query",
            "description": "Pass `true` to receive the template name used for the document.\n\n> **Note:** Requires `template=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "account",
            "in": "query",
            "description": "Pass `true` to receive account ID associated with the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "account_name",
            "in": "query",
            "description": "Pass `true` to receive the organisation's name.\n\n> **Note:** Requires `account=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "account_label",
            "in": "query",
            "description": "Pass `true` to receive the department name configured in **Settings > Admin > Department**.\n\n> **Note:** Requires `account=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "account_brandName",
            "in": "query",
            "description": "Pass `true` to receive the brand name configured in **Settings > Department > Branding**.\n\n> **Note:** Requires `account=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sender",
            "in": "query",
            "description": "Pass `true` to receive sender's email address associated with the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "sender_name",
            "in": "query",
            "description": "Pass `true` to receive the sender's name.\n\n> **Note:** Requires `sender=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "folder",
            "in": "query",
            "description": "Pass `true` to receive folder ID associated with the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "folder_name",
            "in": "query",
            "description": "Pass `true` to receive the folder name(s) for the document.\n\n> **Note:** Requires `folder=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stampDetails",
            "in": "query",
            "description": "Pass `true` to receive stamp paper state and value attached to the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stampDetails_groupName",
            "in": "query",
            "description": "Pass `true` to receive the group name for the stamp papers attached. Stamp groups are a collection of stamp series for a single state.\n\n> **Note:** Requires `stampDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stampDetails_groupNumber",
            "in": "query",
            "description": "Pass `true` to receive the group number for the stamp papers attached.\n\n> **Note:** Requires `stampDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stampDetails_maximumValuePermitted",
            "in": "query",
            "description": "Pass `true` to receive the maximum permitted stamp value configured in the stamp group. Any stamp value above this limit passed in the Create API will be rejected.\n\n> **Note:** Requires `stampDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stampDetails_stamps",
            "in": "query",
            "description": "Pass `true` to receive an array containing stamp paper details - stamp series number, stamp amount and stamp serial number - for each stamp associated with the document.\n\n> **Note:** Requires `stampDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stampDetails_stamps_associatedDocumentId",
            "in": "query",
            "description": "Pass `true` to receive the associated document ID physically printed on the stamp paper.\n\n> **Note:** Requires `stampDetails_stamps=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "stampDetails_stamps_multipleStampSeries",
            "in": "query",
            "description": "Pass `true` to receive whether Multiple Stamp Series was used.\n\n> **Note:** Requires `stampDetails_stamps=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "referenceAttachments",
            "in": "query",
            "description": "Pass `true` to receive the array containing reference attachments details - file, name, and type - for each reference attachment sent with the document. These are files uploaded by the document owner while sending the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails",
            "in": "query",
            "description": "Pass `true` to include NeSL transaction details in the response. Only relevant when the document has a NeSL-type signer.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_responseCode",
            "in": "query",
            "description": "Pass `true` to receive the response code sent by NeSL.\n\n> **Note:** Requires `neslDocumentDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_responseMessage",
            "in": "query",
            "description": "Pass `true` to receive the response message associated with the NeSL response code.\n\n> **Note:** Requires `neslDocumentDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_isRetryAllowed",
            "in": "query",
            "description": "Pass `true` to receive whether retrying is allowed for this NeSL document. Retry is only allowed when the NeSL invitation has failed due to errors other than validation errors.\n\n> **Note:** Requires `neslDocumentDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_loanDetails_event",
            "in": "query",
            "description": "Pass `true` to receive the selected eBG event for this request.\n\n> **Note:** Requires `neslDocumentDetails=true` and `neslDocumentDetails_loanDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_loanDetails_expiryDate",
            "in": "query",
            "description": "Pass `true` to receive the specified expiry date of the eBG for this request.\n\n> **Note:** Requires `neslDocumentDetails=true` and `neslDocumentDetails_loanDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_loanDetails_claimExpiryDate",
            "in": "query",
            "description": "Pass `true` to receive the specified claim expiry date of the eBG for this request.\n\n> **Note:** Requires `neslDocumentDetails=true` and `neslDocumentDetails_loanDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_loanDetails_currencyOfDebt",
            "in": "query",
            "description": "Pass `true` to receive the specified currency of debt for this request.\n\n> **Note:** Requires `neslDocumentDetails=true` and `neslDocumentDetails_loanDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_loanDetails_docRefNo",
            "in": "query",
            "description": "Pass `true` to receive the document reference number for this request.\n\n> **Note:** Requires `neslDocumentDetails=true` and `neslDocumentDetails_loanDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_loanDetails_contractRefNo",
            "in": "query",
            "description": "Pass `true` to receive the contract reference number for this request.\n\n> **Note:** Requires `neslDocumentDetails=true` and `neslDocumentDetails_loanDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_loanDetails_vendorCode",
            "in": "query",
            "description": "Pass `true` to receive the Vendor Code for this request.\n\n> **Note:** Requires `neslDocumentDetails=true` and `neslDocumentDetails_loanDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_loanDetails_portalID",
            "in": "query",
            "description": "Pass `true` to receive the Portal ID for this request.\n\n> **Note:** Requires `neslDocumentDetails=true` and `neslDocumentDetails_loanDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_securityDetails",
            "in": "query",
            "description": "Pass `true` to receive NeSL security details for the document.\n\n> **Note:** Requires `neslDocumentDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_partyDetails",
            "in": "query",
            "description": "Pass `true` to receive NeSL party details for the document.\n\n> **Note:** Requires `neslDocumentDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_stampDetails",
            "in": "query",
            "description": "Pass `true` to receive NeSL stamp details for the document.\n\n> **Note:** Requires `neslDocumentDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "neslDocumentDetails_neslEstampStatusDetails",
            "in": "query",
            "description": "Pass this parameter as `TRUE` to receive the NeSL stamp status and certificate details.\n**Note:** \"neslDocumentDetails\" parameter also needs to be passed as true to receive this in response.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "refreshNeslDocument",
            "in": "query",
            "description": "Pass `true` to get the latest status, certificate details, and document from NeSL in the response.\n\n**Note:** If the document is stamped but not yet signed, NeSL might not provide the stamped file by default. In such cases, clients may need to enable this setting with NeSL for retrieval of the stamped document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "cc",
            "in": "query",
            "description": "Pass `true` to receive an array containing details - name, email, notification types, and more configured for a CC invitees in the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "coordinatePicker",
            "in": "query",
            "description": "Pass `true` to receive the coordinate picker URL and webhook configured in this document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs",
            "in": "query",
            "description": "Pass `true` to receive invitee-level configurations associated with each invitation.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_retry",
            "in": "query",
            "description": "Pass `true` to receive the number of retry attempts configured for the signer. Only applicable to Aadhaar eSign.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_fixedName",
            "in": "query",
            "description": "Pass `true` to receive whether the invitee is allowed to edit their name during the signing journey.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_noName",
            "in": "query",
            "description": "Pass `true` to receive whether the invitee name will appear in the signature appearance.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_supportingDocument",
            "in": "query",
            "description": "Pass `true` to receive the supporting document requirement configured for the invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_viewSupportingDocument",
            "in": "query",
            "description": "Pass `true` to receive the view supporting document configuration for the invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_organizationConfig",
            "in": "query",
            "description": "Pass `true` to receive the organization seal settings configured for this invitation. The organization name appears in the signature box, and the chosen seal forms a digital rubber stamp around it.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_security",
            "in": "query",
            "description": "Pass `true` to receive the status of all security modules configured for each invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_security_gpsConfig",
            "in": "query",
            "description": "Pass `true` to receive the GPS configuration for the invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true` and `invitations_inviteeConfigs_security=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_security_faceMatch",
            "in": "query",
            "description": "Pass `true` to receive the Face Match security module configuration for the invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true` and `invitations_inviteeConfigs_security=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_security_smartUserLiveliness",
            "in": "query",
            "description": "Pass `true` to receive the Smart User Liveliness configuration for the invitee. This only reflects the configuration at the time the invitation was created or edited, and does not capture any admin-level changes.\n\n> **Note:** Requires `invitations_inviteeConfigs=true` and `invitations_inviteeConfigs_security=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_eSignPriorityConfig",
            "in": "query",
            "description": "Pass `true` to receive the eSign priority configuration for the invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_eSignPriorityConfig_orderLevelRetryCount",
            "in": "query",
            "description": "Pass `true` to receive the order-level retry count configured for the invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true` and `invitations_inviteeConfigs_eSignPriorityConfig=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_customURL",
            "in": "query",
            "description": "Pass `true` to receive the custom URL configuration for each invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_customConsent",
            "in": "query",
            "description": "Pass `true` to receive the custom consent content configured for the invitee. Custom consent is an additional configurable consent the signer must accept before proceeding to sign.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_enableRejectDocument",
            "in": "query",
            "description": "Pass `true` to receive whether the signer is allowed to reject the invitation during the signing journey.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_enableRejectMessage",
            "in": "query",
            "description": "Pass `true` to receive whether the signer is required to provide a message when rejecting the invitation.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_languageDetails",
            "in": "query",
            "description": "Pass `true` to receive the language configuration details for the signer.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_paymentDetails",
            "in": "query",
            "description": "Pass `true` to receive the payment collection details configured for the invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeConfigs_maskContactDetails",
            "in": "query",
            "description": "Pass `true` to receive whether Contact Details Masking is enabled for the invitee.\n\n> **Note:** Requires `invitations_inviteeConfigs=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_recordReviewerDetails",
            "in": "query",
            "description": "Pass `true` to receive whether \"Record reviewer details\" is activated for each invitee in the audit trail.\n\n**Note:** This parameter works independently \u2014 no parent parameter is required.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeGroup",
            "in": "query",
            "description": "Pass `true` to receive invitee group details. An invitee group is a single invite consisting of multiple signers where a configurable subset (e.g. 2 out of 5) must sign for the invite to be considered complete.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeGroup_name",
            "in": "query",
            "description": "Pass `true` to receive the invitee group name.\n\n> **Note:** Requires `invitations_inviteeGroup=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeGroup_completionThreshold",
            "in": "query",
            "description": "Pass `true` to receive the group completion threshold \u2014 the number of signatures required in the group invite for it to be considered complete.\n\n> **Note:** Requires `invitations_inviteeGroup=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeGroup_size",
            "in": "query",
            "description": "Pass `true` to receive the total number of invitees in the group invite.\n\n> **Note:** Requires `invitations_inviteeGroup=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_inviteeGroup_completed",
            "in": "query",
            "description": "Pass `true` to receive whether the group signing has been completed.\n\n> **Note:** Requires `invitations_inviteeGroup=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_signatureOptions",
            "in": "query",
            "description": "Pass `true` to receive the signature options allowed for each invitee.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_signatureOptions_quickSign",
            "in": "query",
            "description": "Pass `true` to receive the signature options allowed for Quick Sign.\n\n> **Note:** Requires `invitations_signatureOptions=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_signatureOptions_visualSign",
            "in": "query",
            "description": "Pass `true` to receive the signature options allowed for Visual Sign.\n\n> **Note:** Requires `invitations_signatureOptions=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_signatureOptionsUsed",
            "in": "query",
            "description": "Pass `true` to receive the specific signature sub-type used by the invitee during signing.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_neslInvitationDetails",
            "in": "query",
            "description": "Pass `true` to receive NeSL invitation details for each invitee.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_neslInvitationDetails_participantDetails",
            "in": "query",
            "description": "Pass `true` to receive the participant details of the NeSL invitation.\n\n> **Note:** Requires `invitations_neslInvitationDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_neslInvitationDetails_participantDetails_isIndividual",
            "in": "query",
            "description": "Pass `true` to receive whether the NeSL participant is an individual.\n\n> **Note:** Requires `invitations_neslInvitationDetails_participantDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_neslInvitationDetails_participantDetails_signatoryGender",
            "in": "query",
            "description": "Pass `true` to receive the NeSL signatory's gender.\n\n> **Note:** Requires `invitations_neslInvitationDetails_participantDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_neslInvitationDetails_participantDetails_businessUnit",
            "in": "query",
            "description": "Pass `true` to receive the NeSL participant's business unit.\n\n> **Note:** Requires `invitations_neslInvitationDetails_participantDetails=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_invitationStatus_failureReason",
            "in": "query",
            "description": "Pass `true` to receive the failure or status reason for the invitation.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_invitationStatus_rejectionMessage",
            "in": "query",
            "description": "Pass `true` to receive the reason provided by the approver for rejecting the invitation.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_invitationStatus_signRejectionMessage",
            "in": "query",
            "description": "Pass `true` to receive the reason provided by the signer for rejecting the invitation.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_certificateData",
            "in": "query",
            "description": "Pass `true` to receive the signing certificate data (excluding photoHash, uid, and serialNumber, which require their own sub-parameters).",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_certificateData_photoHash",
            "in": "query",
            "description": "Pass `true` to receive the photoHash from the signing certificate.\n\n> **Note:** Requires `invitations_certificateData=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_certificateData_uid",
            "in": "query",
            "description": "Pass `true` to receive the UID from the signing certificate.\n\n> **Note:** Requires `invitations_certificateData=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_certificateData_serialNumber",
            "in": "query",
            "description": "Pass `true` to receive the serial number from the signing certificate.\n\n> **Note:** Requires `invitations_certificateData=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_verificationRequest",
            "in": "query",
            "description": "Pass `true` to receive the verification configuration for each invitee \u2014 which certificate parameters have been activated for verification.\n\nOnly applicable to Aadhaar eSign, Offline Sign (Cloud DSC), DSC, and NeSL.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_verificationResponse",
            "in": "query",
            "description": "Pass `true` to receive the results of certificate verification \u2014 the actual match outcomes of the configured input values against the signer's certificate data.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_verificationResponse_smartNameAI",
            "in": "query",
            "description": "Pass `true` to receive whether Smart Name AI was enabled during verification.\n\n> **Note:** Requires `invitations_verificationResponse=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_verificationResponse_faceMatch",
            "in": "query",
            "description": "Pass `true` to receive the Face Match verification results for the invitee.\n\n> **Note:** Requires `invitations_verificationResponse=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_verificationResponse_smartUserLiveliness",
            "in": "query",
            "description": "Pass `true` to receive Smart User Liveliness verification results.\n\n> **Note:** Requires `invitations_verificationResponse=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_verificationResponse_neslVerficationResponse",
            "in": "query",
            "description": "Pass `true` to receive the NeSL invitee's verification results (Name, Gender, and Year of Birth).\n\n> **Note:** Requires `invitations_verificationResponse=true`.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_supportingDocuments",
            "in": "query",
            "description": "Pass `true` to receive the supporting documents requested from the signer.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_requiresApproverOtp",
            "in": "query",
            "description": "Pass `true` to receive whether the non-OTP approver flow is activated for the invitee.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "invitations_signatureSubOptionUsed",
            "in": "query",
            "description": "Pass `true` to receive the Signature subtype used by the invitee to sign the document.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Response Data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetails3_3ApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ],
        "operationId": "check-document-details"
      }
    },
    "/v3.0/document/completed": {
      "get": {
        "tags": [
          "Document"
        ],
        "operationId": "list-completed-documents",
        "summary": "List completed documents",
        "description": "Retrieves a paginated list of all completed documents from your Leegality account. Documents are returned in **ascending order** by completion date (oldest first).\n\nUse this API to:\n- Fetch completed documents for archival or reconciliation\n- Search by document name (pattern match) or IRN (exact match)\n- Filter by completion date range\n\n**Pagination:** Use `max` and `offset` to paginate through results. The `totalCount` field in the response indicates the total number of matching documents.\n\n**Note:** This API only returns documents in COMPLETED status. For documents in other statuses, use the [List documents](/document-execution/api/list-documents) endpoint.",
        "parameters": [
          {
            "name": "max",
            "in": "query",
            "description": "Maximum number of documents to return per request.\n\n**Default:** `20`\n\n**Valid range:** `1` to `40`\n\n**Note:** If a value greater than `40` is passed, the API silently resets it to `20` (the default) instead of returning an error or capping at 40.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1,
              "maximum": 40
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of documents to skip before returning results. Used for pagination.\n\n**Default:** `0`\n\n**Example:** To get the second page of results with 20 per page, use `offset=20`.\n\nIf `offset` exceeds the total number of documents, an empty `documents` array is returned with the correct `totalCount`.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Filter documents by name using **pattern matching** (case-insensitive partial match).\n\n**Example:** `name=dummy` will match documents named `dummy PDF.pdf`, `My dummy document`, etc.\n\nThe `totalCount` in the response reflects the filtered count.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "irn",
            "in": "query",
            "description": "Filter documents by Invoice Reference Number (IRN). This is an **exact match** filter \u2014 partial IRN values will not return results.\n\n**Example:** If a document has IRN `12222223`, searching for `irn=12222223` returns it, but `irn=12222` returns nothing.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Filter documents completed on or after this date.\n\n**Format:** `dd-MM-yyyy`\n\n**Example:** `01-01-2026`\n\nCan be used alone (without `endDate`) to get all documents completed from this date onwards.\n\n**Note:** The filter is based on the document's completion date, not the creation date. An invalid format returns error code `validator.invalid`.",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{2}-\\d{2}-\\d{4}$"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "Filter documents completed on or before this date.\n\n**Format:** `dd-MM-yyyy`\n\n**Example:** `28-02-2026`\n\nCan be used alone (without `startDate`) to get all documents completed up to this date.\n\n**Note:** The filter is based on the document's completion date, not the creation date. An invalid format returns error code `validator.invalid`.",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^\\d{2}-\\d{2}-\\d{4}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompletedDocumentsApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.3/document/fetchDocument": {
      "get": {
        "tags": [
          "Document"
        ],
        "operationId": "fetch-document",
        "summary": "Fetch document",
        "description": "Downloads the signed document, audit trail, sender attachments, or invitee supporting documents associated with a completed document.\n\nUse this API to fetch any of the following files:\n- **DOCUMENT** \u2014 The signed PDF document\n- **AUDIT_TRAIL** \u2014 The audit trail PDF generated by Leegality on document completion\n- **ATTACHMENT** \u2014 Reference attachments uploaded by the sender\n- **SUPPORTING_DOCUMENT** \u2014 Supporting documents uploaded by an invitee during signing\n\nThe response contains a **CDN download URL** (not base64-encoded content). The URL expires in **15 seconds** \u2014 download the file immediately at the server level. Each API call generates a unique URL, so you can call again if the URL expires.\n\n**Important:**\n- This API only works for **completed** documents. Documents in SENT or DRAFT status return `no.document.found`.\n- The `documentDownloadType` value is **case-sensitive** and must be uppercase.\n- You can only fetch one file type per API call.",
        "parameters": [
          {
            "name": "documentId",
            "in": "query",
            "description": "The unique Document ID generated by Leegality when the eSigning request was created. Can also be retrieved from the Leegality dashboard.\n\n**Note:** Only completed documents can be fetched. SENT or DRAFT documents return error `no.document.found`.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentDownloadType",
            "in": "query",
            "description": "The type of file to download. Only one value can be passed per API call.\n\n**Possible values:**\n- `DOCUMENT` \u2014 The signed PDF document\n- `AUDIT_TRAIL` \u2014 The audit trail generated by Leegality on document completion\n- `ATTACHMENT` \u2014 Reference attachments uploaded by the sender (requires `index`)\n- `SUPPORTING_DOCUMENT` \u2014 Supporting documents uploaded by an invitee (requires `supportDocumentUrl` and `index`)\n\n**Note:** Values are **case-sensitive** and must be uppercase. Lowercase or invalid values return error code `document.download.type` with the list of valid values.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "DOCUMENT",
                "AUDIT_TRAIL",
                "ATTACHMENT",
                "SUPPORTING_DOCUMENT"
              ]
            }
          },
          {
            "name": "supportDocumentUrl",
            "in": "query",
            "description": "The invitation URL of the invitee whose supporting documents you want to fetch. The invitation URL is returned in the Create eSigning Request API response.\n\nAccepts either the full invitation URL (e.g., `https://sandbox.leegality.com/sign/544bf18f-...`) or just the UUID portion (e.g., `544bf18f-91b8-4afb-96ee-8ff1927a2726`).\n\n**Required when** `documentDownloadType` = `SUPPORTING_DOCUMENT`.\n\nIgnored for other `documentDownloadType` values.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "query",
            "description": "The 0-based index of the attachment or supporting document to fetch.\n\n**Example:** Pass `0` for the first file, `1` for the second, and so on.\n\n**Required when** `documentDownloadType` = `ATTACHMENT` or `SUPPORTING_DOCUMENT`.\n\nIgnored for `DOCUMENT` and `AUDIT_TRAIL` types.\n\n**Error codes:**\n- `index.not.negative` \u2014 Returned if a negative value is passed\n- `index.out.of.bound` \u2014 Returned if the index exceeds the number of available files\n- `no.attachments.exists` \u2014 Returned if no attachments exist for the document",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchDocumentApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.1/document/fetchDocument": {
      "get": {
        "tags": [
          "Document"
        ],
        "operationId": "fetch-document-binary",
        "summary": "Fetch document (binary)",
        "description": "Downloads the signed document, audit trail, sender attachments, or invitee supporting documents in **raw binary format**.\n\nThis is the binary variant of the [Fetch document](/document-execution/api/fetch-document) API. Instead of returning a JSON response with a CDN URL, this endpoint streams the file bytes directly in the HTTP response body.\n\n**When to use this vs. v3.3:**\n- Use **v3.1** (this endpoint) when you need the raw file bytes for direct processing or storage without an intermediate download step.\n- Use **v3.3** ([Fetch document](/document-execution/api/fetch-document)) when you need a CDN download URL to pass to another service or client.\n\n**Document completion requirements:**\n- `DOCUMENT`, `ATTACHMENT`, and `SUPPORTING_DOCUMENT` can be downloaded at any stage regardless of document status.\n- `AUDIT_TRAIL` can only be downloaded after the document is fully completed. Attempting to download an audit trail for an incomplete document returns error `document.not.completed`.\n\n**Important:** Only one `documentDownloadType` value can be passed per request. Passing multiple values (e.g., `?documentDownloadType=AUDIT_TRAIL&documentDownloadType=DOCUMENT`) returns error `document.download.type`.\n\n**Note on error responses:** All errors — including validation errors — are returned with HTTP status `200`. Check the `status` field (`0` = failure) and `messages[].code` to detect errors.",
        "parameters": [
          {
            "name": "documentId",
            "in": "query",
            "description": "The unique Document ID generated by Leegality when the eSigning request was created. Can also be retrieved from the Leegality dashboard.\n\n**Note:** `DOCUMENT`, `ATTACHMENT`, and `SUPPORTING_DOCUMENT` types can be fetched at any document stage. `AUDIT_TRAIL` requires the document to be fully completed.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentDownloadType",
            "in": "query",
            "description": "The type of file to download. Only one value can be passed per request — passing multiple values returns error `document.download.type`.\n\n**Possible values:**\n- `DOCUMENT` \u2014 The signed PDF document (Content-Type: `application/pdf`). Available at any document stage.\n- `AUDIT_TRAIL` \u2014 The audit trail generated by Leegality (Content-Type: `application/pdf`). Only available after the document is fully completed; returns error `document.not.completed` otherwise.\n- `ATTACHMENT` \u2014 Reference attachments uploaded by the sender (requires `index`). Available at any document stage.\n- `SUPPORTING_DOCUMENT` \u2014 Supporting documents uploaded by an invitee (requires `supportDocumentUrl` and `index`). Available at any document stage.\n\n**Note:** Values are **case-sensitive** and must be uppercase. Lowercase or invalid values return error code `document.download.type`.",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "DOCUMENT",
                "AUDIT_TRAIL",
                "ATTACHMENT",
                "SUPPORTING_DOCUMENT"
              ]
            }
          },
          {
            "name": "supportDocumentUrl",
            "in": "query",
            "description": "The invitation URL of the invitee whose supporting documents you want to fetch.\n\nAccepts either the full invitation URL (e.g., `https://sandbox.leegality.com/sign/544bf18f-...`) or just the UUID portion (e.g., `544bf18f-91b8-4afb-96ee-8ff1927a2726`).\n\n**Required when** `documentDownloadType` = `SUPPORTING_DOCUMENT`.\n\nIgnored for other `documentDownloadType` values.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "index",
            "in": "query",
            "description": "The 0-based index of the attachment or supporting document to fetch.\n\n**Example:** Pass `0` for the first file, `1` for the second, and so on.\n\n**Required when** `documentDownloadType` = `ATTACHMENT` or `SUPPORTING_DOCUMENT`.\n\nIgnored for `DOCUMENT` and `AUDIT_TRAIL` types.\n\n**Error codes:**\n- `index.not.negative` \u2014 Returned if a negative value is passed\n- `index.out.of.bound` \u2014 Returned if the index exceeds the number of available files\n- `no.attachments.exists` \u2014 Returned if no attachments exist for the document",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "**On success:** Returns the raw binary file with the appropriate Content-Type header (`application/pdf` for documents and audit trails; varies for attachments and supporting documents).\n\n**On error:** Returns a JSON response with `status: 0` and an error code in `messages[].code`. **All errors are returned with HTTP 200** — use the `status` field and `messages[].code` to detect failures, not the HTTP status code.\n\n| `messages[].code` | `messages[].message` |\n|---|---|\n| `document.not.completed` | Document has not been completed yet. Audit trail cannot be downloaded for incomplete documents. |\n| `document.download.type` | Document Type (AUDIT_TRAIL,DOCUMENT) Not Supported. Please enter value as : [DOCUMENT, AUDIT_TRAIL, ATTACHMENT, SUPPORTING_DOCUMENT]. |",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Raw PDF file bytes. Returned for `DOCUMENT` and `AUDIT_TRAIL` types."
                }
              },
              "image/*": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Raw image file bytes. Returned for `SUPPORTING_DOCUMENT` or `ATTACHMENT` types when the file is an image."
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FetchDocumentBinaryErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.1/invitation/activate": {
      "put": {
        "tags": [
          "Invitation"
        ],
        "operationId": "activate-invitation",
        "summary": "Activate invitation",
        "description": "Activates an invitation that is not yet active due to a pre-defined signing order. Use this API to enable invitations out of turn \u2014 for example, when an earlier signer is unable to sign and you want subsequent signers to proceed.\n\n**Use case:** In a sequential signing workflow (Signer 1 \u2192 Signer 2 \u2192 Signer 3), if Signer 1 is unavailable, you can use this API to activate Signer 2's invitation directly, bypassing the signing order.\n\n**Important:**\n- Only invitations that are **inactive** (waiting in signing order) and **not expired** can be activated.\n- **NeSL invitations** cannot be manually activated \u2014 the API returns `invitation.manual.activation.not.allowed`.\n- Already-active, already-signed, expired, or rejected invitations cannot be activated.\n- The `signUrl` parameter accepts both the full invitation URL and the UUID portion only.\n\n**Note:** This API does not change the signing order permanently. It only activates the specified invitation for the current document.",
        "parameters": [
          {
            "name": "signUrl",
            "in": "query",
            "description": "The sign URL (invitation URL) of the inactive invitation to activate.\n\nThe invitation URL is returned in the Create eSigning Request API response for each invitee.\n\nAccepts either the full URL (e.g., `https://sandbox.leegality.com/sign/544bf18f-...`) or just the UUID portion (e.g., `544bf18f-91b8-4afb-96ee-8ff1927a2726`).",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivateInvitationApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/sign/docSigner/invitation": {
      "post": {
        "tags": [
          "Invitation"
        ],
        "operationId": "esign-docsigner-invitation",
        "summary": "eSign DocSigner invitation",
        "description": "Signs an invitation configured with the **Document Signer Certificate** (DocSigner) sign type via API.\n\nThis API can be used to eSign using DocSigner certificates stored on either Leegality's server or the client's server.\n\n**Prerequisites:**\n- An active eSigning invitation must already exist (created via the [Create eSigning request](/document-execution/api/create-an-e-signing-request) API)\n\n**Important:**\n- This API **cannot** be used for invitations configured with \"Automated DocSigners\" \u2014 those are signed automatically.\n- After successful signing, if there are subsequent invitees in the signing order, their invitations are automatically activated.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DocSignerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Default Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocSignerApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/sign/request/invitation": {
      "delete": {
        "tags": [
          "Invitation"
        ],
        "operationId": "delete-invitation",
        "summary": "Delete invitation",
        "description": "Deletes an unsigned invitation from a document, permanently removing the invitee's access.\n\n**When to use**\n\n- An invitee was added by mistake and needs to be removed\n- A signer is no longer required (e.g., role change, contract amendment)\n- An invitee's signing invitation is stuck (e.g., previous signer's certificate verification failed) and needs to be cleared\n\n**What can be deleted**\n\n- **Unsigned invitations** \u2014 invitees who have not yet signed the document\n- **Active or inactive invitations** \u2014 regardless of whether it's currently the invitee's turn\n- **Group invitations** \u2014 if no members of the group have signed yet\n\n**What cannot be deleted**\n\n- **Already-signed invitations** \u2014 returns `invitation.not.exists`\n- **Invitations from completed documents** \u2014 returns `invitation.not.exists`\n\n:::caution\nThis operation is irreversible. The deleted invitee will no longer be able to access or sign the document. Deleting an already-deleted invitation returns `invitation.not.exists` (not idempotent \u2014 unlike delete document).\n:::\n\nThe `data` field in the response is always an empty object `{}`.",
        "parameters": [
          {
            "name": "signUrl",
            "in": "query",
            "description": "Signature URL of the invitation to delete.\n\n**Format:** Either the full sign URL or just the UUID portion.\n\nBoth formats are accepted:\n- Full URL: `https://sandbox.leegality.com/sign/db9f8b15-84be-47e4-a885-66cdce4bc80c`\n- UUID only: `db9f8b15-84be-47e4-a885-66cdce4bc80c`\n\nGet from the **Create eSigning request** API response (`invitations[].signUrl`) or from the **Check document details** API response.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delete invitation response. Check `status` field: `1` = success, `0` = failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteInvitationApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/sign/request/complete": {
      "post": {
        "tags": [
          "Document"
        ],
        "operationId": "mark-document-complete",
        "summary": "Mark document as complete",
        "description": "Marks an incomplete (SENT) document as complete, even if not all invitees have signed.\n\nUse this API to force-complete a document when remaining invitees are no longer required to sign. This is useful when a subset of signers have completed their signatures and the remaining invitations can be discarded.\n\n**Prerequisites**\n\nBefore calling this API, the document **must not have any active invitations**. Use the [Delete invitation](/document-execution/api/delete-invitation) API to remove any remaining unsigned invitations first.\n\nTypical workflow:\n1. Identify the invitations that are no longer needed\n2. Delete each unsigned invitation using the Delete invitation API\n3. Call this API to mark the document as complete\n\n**Which documents can be completed**\n\n- **SENT documents** with no remaining active (unsigned) invitations\n\n**Which documents cannot be completed**\n\n- **Already completed documents** \u2014 returns `document.already.completed`\n- **Documents with active invitations** \u2014 delete the invitations first\n- **Deleted or non-existent documents** \u2014 returns `no.document.found`\n\nThe `documentId` must be sent in the **request body** as JSON (not as a query parameter). The `data` field in the response is always an empty object `{}`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteDocumentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Complete document response. Check `status` field: `1` = success, `0` = failure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompleteDocumentApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.1/series/list": {
      "get": {
        "tags": [
          "Stamps"
        ],
        "operationId": "list-stamp-series",
        "summary": "List stamp series",
        "description": "Returns details of all stamp paper series in your account.",
        "parameters": [
          {
            "name": "firstPartyName",
            "in": "query",
            "description": "Include the first party name in each series item.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "secondPartyName",
            "in": "query",
            "description": "Include the second party name in each series item.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "purpose",
            "in": "query",
            "description": "Include the purpose/use case configured for each series.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "legend",
            "in": "query",
            "description": "Include the legend text configured for each series. The legend is the descriptive text printed on the stamp paper.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "underProcess",
            "in": "query",
            "description": "Include the count of stamps currently under process in each series.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "blocked",
            "in": "query",
            "description": "Include the count of blocked stamps in each series.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "reserved",
            "in": "query",
            "description": "Include the count of reserved stamps in each series.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "unused",
            "in": "query",
            "description": "Include the count of unused (available) stamps in each series.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "used",
            "in": "query",
            "description": "Include the count of used stamps in each series.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "expired",
            "in": "query",
            "description": "Include the count of expired stamps in each series.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "total",
            "in": "query",
            "description": "Include the total stamp count in each series.\n\n**Note:** `total` = `unused` + `underProcess` + `blocked` + `used` + `expired` + `reserved`.\n\n**Default:** `false` \u2014 field is omitted from response when not requested.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stamp series list retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StampSeriesListApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.1/series/expiry": {
      "get": {
        "tags": [
          "Stamps"
        ],
        "operationId": "list-expiring-stamps",
        "summary": "List expiring stamp series",
        "description": "Returns stamp series that are expiring soon or have already expired.\n\nUse this API to monitor stamp paper expiry dates and plan procurement.",
        "parameters": [
          {
            "name": "lookUpPeriod",
            "in": "query",
            "description": "Number of days to look ahead for expiring stamps.\n\nOnly stamps with an expiry date within this many days from today are returned. For example, `lookUpPeriod=30` returns stamps expiring in the next 30 days.\n\n**Default:** `30`\n\n**Note:** Negative values return 0 results without error. Non-numeric values return a `typeMismatch` error.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 30
            }
          },
          {
            "name": "includeExpired",
            "in": "query",
            "description": "Whether to include already-expired stamp series in the results.\n\nWhen `true`, **all** expired stamps are included regardless of the `lookUpPeriod` value. The expired entries appear alongside the future-expiring entries, sorted by expiry date.\n\n**Default:** `false`\n\n**Accepted truthy values:** `true`, `TRUE`, `1`.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Expiring stamp series retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StampSeriesExpiryApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/series/groups/list": {
      "get": {
        "tags": [
          "Stamps"
        ],
        "operationId": "list-stamp-groups",
        "summary": "List stamp groups",
        "description": "Returns details of all stamp groups in your account.\n\nEach stamp group bundles one or more stamp series under a single group identifier. Groups are configured per state and define a maximum permitted stamp value.\n\nThe response includes the group name, group number, state, maximum value allowed, and the stamp series (with denominations) belonging to each group.",
        "responses": {
          "200": {
            "description": "Stamp groups retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StampGroupListApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/wallet/balance/details": {
      "get": {
        "tags": [
          "Wallet"
        ],
        "operationId": "get-wallet-balance",
        "summary": "Get wallet balance",
        "description": "Returns the eSign wallet balance for your account.\n\nThe response provides total eSign credits broken down by status: expired, consumed, unused, and reserved.\n\n**Balance math:** `total` = `expired` + `consumed` + `unused` + `reserved`",
        "responses": {
          "200": {
            "description": "Wallet balance retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletBalanceApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.0/wallet/balance/list": {
      "get": {
        "tags": [
          "Wallet"
        ],
        "operationId": "list-wallet-purchases",
        "summary": "List eSign purchases",
        "description": "Returns consumption and expiry details of eSign purchases made from your account.\n\nBy default, returns purchases that still have remaining eSign credits. Use the `completed` parameter to retrieve fully consumed purchases instead.\n\n**Purchase math:** `purchaseQuantity` = `consumed` + `unused` + `expired`",
        "parameters": [
          {
            "name": "completed",
            "in": "query",
            "description": "Filter by purchase consumption status.\n\nWhen `true`, returns only purchases that are fully consumed (no remaining credits). When `false` or omitted, returns purchases that still have eSign credits remaining.\n\n**Default:** `false`",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "max",
            "in": "query",
            "description": "Maximum number of records to return.\n\n**Default:** `20`\n\n**Maximum:** `40`",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of records to skip before returning results. Use with `max` for pagination.\n\n**Default:** `0`",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "eSign purchase list retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletPurchaseListApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.3/nesl/neslRetryRequest": {
      "post": {
        "tags": [
          "NeSL"
        ],
        "operationId": "retry-nesl-transaction",
        "summary": "Retry NeSL transaction",
        "description": "Retries a failed NeSL transaction.\n\nUse this API to retrigger NeSL transactions that failed due to network or server issues (not validation errors). Transactions with validation errors (e.g., invalid party names) will return `canRetry: false` and cannot be retried until the underlying issue is fixed.\n\nYou must pass either `documentId` or `neslTransactionId` (or both). If neither is provided, the API returns a `document.id.or.txnid.required` error.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NeslRetryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "NeSL retry response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NeslRetryApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.3/nesl/notification/list": {
      "get": {
        "tags": [
          "NeSL"
        ],
        "operationId": "list-nesl-notifications",
        "summary": "List eBG notifications",
        "description": "Returns a list of NeSL eBG (Electronic Bank Guarantee) event notifications.\n\nUse this API to retrieve notifications for eBG lifecycle events such as amendments, renewals, cancellations, invocations, and more. Results can be filtered by loan number, notification status, request type, and whether the notification was sent to the current user.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Search by loan number. Returns all eBG notifications associated with the specified loan number.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter notifications by review status.\n\n**Possible values:** `ACCEPTED`, `REJECTED`, `PENDING`.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ACCEPTED",
                "REJECTED",
                "PENDING"
              ]
            }
          },
          {
            "name": "requestType",
            "in": "query",
            "description": "Filter notifications by eBG event type.\n\n**Possible values:** `AMENDMENT`, `RENEWAL`, `EXTEND_OR_PAY`, `CANCELLATION`, `CLOSURE`, `PARTIAL_INVOCATION`, `INVOCATION`.",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "AMENDMENT",
                "RENEWAL",
                "EXTEND_OR_PAY",
                "CANCELLATION",
                "CLOSURE",
                "PARTIAL_INVOCATION",
                "INVOCATION"
              ]
            }
          },
          {
            "name": "sentToMe",
            "in": "query",
            "description": "Filter by notification recipient.\n\nWhen `true`, returns only notifications sent to the current API user. When `false`, returns all notifications received by any user in the organization.\n\n**Default:** `false`",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "max",
            "in": "query",
            "description": "Maximum number of results to return.",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Number of records to skip before returning results. Use with `max` for pagination.",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "eBG notifications retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NeslNotificationListApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.3/nesl/notification/detail/{notifTxnId}": {
      "get": {
        "tags": [
          "NeSL"
        ],
        "operationId": "get-nesl-notification-detail",
        "summary": "Get eBG notification detail",
        "description": "Returns the complete details of a specific eBG notification.\n\nUse this API to retrieve the full details of an eBG notification event, including loan details, participant information, request details, and review status.",
        "parameters": [
          {
            "name": "notifTxnId",
            "in": "path",
            "description": "The unique notification transaction ID of the eBG event for which details are to be retrieved.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "eBG notification details retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NeslNotificationDetailApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/v3.3/nesl/notification/review": {
      "post": {
        "tags": [
          "NeSL"
        ],
        "operationId": "review-nesl-notification",
        "summary": "Review eBG notification",
        "description": "Approves or rejects an eBG event notification.\n\nUse this API to approve or reject an eBG event notification by providing the notification transaction ID, loan number, review status, and optional remarks.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NeslNotificationReviewRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "eBG notification review response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NeslNotificationReviewApiResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "X-Auth-Token": []
          }
        ]
      }
    },
    "/your-webhook-endpoint/signer-signs": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "signer-signs-document",
        "summary": "Invitee Signed",
        "description": "Fires when a signer successfully completes a signing action. Delivered to the **Webhook URL** configured on the invitee in the workflow.\n\nWebhook v2.5 is a lightweight format \u2014 it does not include the signed file or audit trail. Use the [Details API](/document-execution/api/check-document-details) to retrieve those after receiving the webhook.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignerSignsDocumentPayload"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Return any 2XX status code (200, 201, or 202) to acknowledge receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No specific response body is required. Any 2XX status code is accepted.",
                  "example": {
                    "status": "received"
                  }
                }
              }
            }
          }
        },
        "x-hideSendButton": true
      }
    },
    "/your-webhook-endpoint/reviewer-approves": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "reviewer-approves-document",
        "summary": "Reviewer Approved",
        "description": "Fires when a reviewer successfully approves a document. Delivered to the **Webhook URL** configured on the invitee in the workflow.\n\nWebhook v2.5 is a lightweight format \u2014 it does not include the signed file or audit trail. Use the [Details API](/document-execution/api/check-document-details) to retrieve those after receiving the webhook.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewerApprovesDocumentPayload"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Return any 2XX status code (200, 201, or 202) to acknowledge receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No specific response body is required. Any 2XX status code is accepted.",
                  "example": {
                    "status": "received"
                  }
                }
              }
            }
          }
        },
        "x-hideSendButton": true
      }
    },
    "/your-webhook-endpoint/signer-rejects": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "signer-rejects-document",
        "summary": "Signer Rejected",
        "description": "Fires when a signer explicitly rejects a document. Delivered to the **Error Webhook URL** configured on the invitee in the workflow.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignerRejectsDocumentPayload"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Return any 2XX status code (200, 201, or 202) to acknowledge receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No specific response body is required. Any 2XX status code is accepted.",
                  "example": {
                    "status": "received"
                  }
                }
              }
            }
          }
        },
        "x-hideSendButton": true
      }
    },
    "/your-webhook-endpoint/reviewer-rejects": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "reviewer-rejects-document",
        "summary": "Reviewer Rejected",
        "description": "Fires when a reviewer rejects a document. Delivered to the **Webhook URL** configured on the invitee in the workflow.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReviewerRejectsDocumentPayload"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Return any 2XX status code (200, 201, or 202) to acknowledge receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No specific response body is required. Any 2XX status code is accepted.",
                  "example": {
                    "status": "received"
                  }
                }
              }
            }
          }
        },
        "x-hideSendButton": true
      }
    },
    "/your-webhook-endpoint/verification-failed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "certificate-verification-failed",
        "summary": "Certificate Verification Failed",
        "description": "Fires when a signer's signature certificate does not match the verification criteria configured on the invitee (name, pincode, state, title, year of birth, or gender). The signing attempt is blocked and the invitation is terminated. Delivered to the **Error Webhook URL**.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CertificateVerificationFailedPayload"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Return any 2XX status code (200, 201, or 202) to acknowledge receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No specific response body is required. Any 2XX status code is accepted.",
                  "example": {
                    "status": "received"
                  }
                }
              }
            }
          }
        },
        "x-hideSendButton": true
      }
    },
    "/your-webhook-endpoint/invitation-expired": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "document-expired",
        "summary": "Document Expired",
        "description": "Fires when an invitation passes its configured expiry date without the invitee completing the signing action. Delivered to the **Error Webhook URL**.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvitationExpiredPayload"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Return any 2XX status code (200, 201, or 202) to acknowledge receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No specific response body is required. Any 2XX status code is accepted.",
                  "example": {
                    "status": "received"
                  }
                }
              }
            }
          }
        },
        "x-hideSendButton": true
      }
    },
    "/your-webhook-endpoint/coordinate-picker": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "operationId": "coordinate-picker-webhook",
        "summary": "Coordinate Picker",
        "description": "Leegality sends this payload to the **Coordinate Picker Webhook URL** configured in the invitee-level options when eSign coordinates are successfully placed on the document.\n\nThis webhook is only triggered when the **Coordinate Picker** feature is enabled in the workflow. It fires once the signer has placed their signature coordinates, before the document is sent for signing.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CoordinatePickerWebhookPayload"
              }
            }
          }
        },
        "responses": {
          "2XX": {
            "description": "Return any 2XX status code (200, 201, or 202) to acknowledge receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "No specific response body is required. Any 2XX status code is accepted.",
                  "example": {
                    "status": "received"
                  }
                }
              }
            }
          }
        },
        "x-hideSendButton": true
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-Auth-Token": {
        "type": "apiKey",
        "name": "X-Auth-Token",
        "in": "header"
      }
    },
    "schemas": {
      "SignRequest": {
        "type": "object",
        "required": [
          "file",
          "invitees",
          "profileId"
        ],
        "properties": {
          "profileId": {
            "type": "string",
            "description": "The Workflow ID for this signing request. Find it in your Leegality Dashboard.",
            "example": "7WMVrYf"
          },
          "file": {
            "$ref": "#/components/schemas/File"
          },
          "stampSeries": {
            "type": "string",
            "description": "The stamp series to apply to this document.\n\n- **Note:** Ensure the selected series has stamps available. You can verify and manage stamp inventory under the **[Stamp](/document-execution/stamps/stamp-series/)** tab in your Dashboard."
          },
          "multipleStampSeries": {
            "type": "array",
            "description": "Ensure the selected series has stamps available. You can verify and manage stamp inventory under the **[Stamp](/document-execution/stamps/stamp-series/)** tab in your Dashboard.",
            "items": {
              "$ref": "#/components/schemas/multipleStampSeries"
            }
          },
          "seriesGroup": {
            "type": "string",
            "description": "Stamp group to use for this document.\n\n- **Note:** You can view available groups under the **[Stamp](/document-execution/stamps/stamp-group/stamp-groups)** tab in your Dashboard.",
            "example": "DL02"
          },
          "stampValue": {
            "type": "string",
            "description": "Stamp amount value for this document.",
            "example": "5000"
          },
          "stampUpload": {
            "$ref": "#/components/schemas/stampUpload"
          },
          "revenueStampSeries": {
            "type": "string",
            "description": "Revenue stamp series to use.",
            "example": "06"
          },
          "revenueStampQuantity": {
            "type": "string",
            "description": "Number of revenue stamps to attach to the document.\n\n- **Default:** 1",
            "example": "2"
          },
          "neslData": {
            "$ref": "#/components/schemas/Nesl"
          },
          "invitees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invitee"
            }
          },
          "cc": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Cc"
            }
          },
          "irn": {
            "type": "string",
            "description": "Internal Reference Number (IRN) for the document. Used to search or reference this document via API or Dashboard.\n\n- **Allowed characters:** Alphanumeric, `+`, `|`, `-`, `:`, `(`, `)`, `,`, `_`, `.`, `[`, `]`, `&`, `/`, and `@`\n- **Max length:** 255 characters",
            "maxLength": 255
          }
        }
      },
      "File": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name for the document.\n\n- **Allowed characters:** Alphanumeric, `+`, `|`, `-`, `:`, `(`, `)`, `,`, `_`, `.`, `[`, `]`, `&`, `/`, and `@`\n- **Max length:** 255 characters",
            "maxLength": 255,
            "pattern": "^[a-zA-Z0-9+@|\\-:(),_.\\[\\]&/ ]+$",
            "example": "KYC_Application_Form"
          },
          "file": {
            "type": "string",
            "description": "Base64-encoded string of the PDF to be eSigned.\n\n- **Format:** Base64-encoded PDF\n- **Max size:** 15 MB (before encoding)",
            "example": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC9UeXBlL..."
          },
          "fields": {
            "type": "array",
            "description": "One object represents a single field in a template-type workflow. Get the complete field structure including IDs from Dashboard > Template Editor > Download Form Fields. Leave empty if you want the first invitee to fill in this field themselves.",
            "items": {
              "$ref": "#/components/schemas/TemplateFields"
            }
          },
          "autoGroupedFieldsFill": {
            "type": "boolean",
            "default": false,
            "description": "Enables automatic population of grouped fields in HTML templates. Grouped fields share the same data across multiple locations (e.g., an address repeated in five places). When `true`, pass only one field from each group \u2014 all others in the group are auto-populated. When `false`, all grouped fields must be passed individually.\n\n- **Default:** `false`\n- **Note:** Only works with HTML templates. Currently in Beta.",
            "example": true
          },
          "additionalFiles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of Base64-encoded PDF strings to append to the main document.\n\n- **Format:** Array of Base64-encoded PDFs\n- **Max total size:** 15 MB",
            "example": [
              "JVBERi0xLjQKJeLjz9MKMSAwIG9iago...",
              "JVBERi0xLjcKJcfsj6UKMzQgMCBvYmo..."
            ]
          }
        },
        "description": "File configuration. For PDF workflows, provide a base64-encoded PDF. For template workflows, provide the template field values."
      },
      "TemplateFields": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the template field.",
            "example": "field_123"
          },
          "name": {
            "type": "string",
            "description": "Name of the template field.",
            "example": "employeeName"
          },
          "type": {
            "type": "string",
            "description": "Type of the template field.\n\n- **Allowed:** `checkbox`, `radio`, `text`, `dropdown`, `textarea`, `select`, `files`",
            "enum": [
              "text",
              "textarea",
              "checkbox",
              "radio",
              "dropdown",
              "select",
              "files"
            ],
            "example": "text"
          },
          "value": {
            "type": "string",
            "description": "The value to pre-fill for this template field.",
            "example": "John Doe"
          },
          "checked": {
            "type": "boolean",
            "description": "Indicates whether this option is selected by default in template.\n\n- **Required:** When `type` is `checkbox` or `radio`.",
            "example": true
          },
          "multiple": {
            "type": "boolean",
            "description": "Indicates whether the user can select more than one option.. **Required:** When `type` is `dropdown`.",
            "example": false
          },
          "width": {
            "type": "string",
            "description": "Width of the image in px.\n\n- **Required:** When `type` is `files` (image).",
            "example": "200"
          },
          "height": {
            "type": "string",
            "description": "Height of the image in px.\n\n- **Required:** When `type` is `files` (image).",
            "example": "150"
          },
          "required": {
            "type": "boolean",
            "description": "Indicates whether the invitee must fill in this field during the signing process.",
            "example": true
          }
        },
        "description": "One object represents a single field in a template-type workflow. Get the complete field structure including IDs from Dashboard > Template Editor > Download Form Fields."
      },
      "workflowPaymentCollectionConfig": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount to collect from the signer before signing.\n\n- **Range:** Greater than \u20b910",
            "example": "500"
          }
        },
        "description": "Payment collection configuration for collecting a fee from the signer before they can sign the document."
      },
      "gpsConfig": {
        "type": "object",
        "properties": {
          "applyLocationRestriction": {
            "type": "boolean",
            "default": false,
            "description": "Enables location-based signing restriction. When `true`, the signer can only sign from within the area defined by `allowedLatitude`, `allowedLongitude`, and `permissibleRadius`."
          },
          "allowedLatitude": {
            "type": "number",
            "description": "Latitude of the permitted signing location.\n\n- **Required:** When `applyLocationRestriction` is `true`.\n- **Format:** Decimal degrees",
            "example": 29.982643
          },
          "allowedLongitude": {
            "type": "number",
            "description": "Longitude of the permitted signing location.\n\n- **Required:** When `applyLocationRestriction` is `true`.\n- **Format:** Decimal degrees",
            "example": 78.055405
          },
          "permissibleRadius": {
            "type": "integer",
            "default": 0,
            "description": "Radius (in meters) around the permitted location within which signing is allowed.\n\n- **Required:** When `applyLocationRestriction` is `true`.",
            "example": 5000
          },
          "applyLocationAccuracy": {
            "type": "boolean",
            "default": false,
            "description": "Enables GPS accuracy-based restriction. When `true`, the signer's device GPS accuracy is validated against `accuracyThreshold`."
          },
          "accuracyThreshold": {
            "type": "integer",
            "default": 0,
            "description": "Maximum allowed GPS accuracy in meters. Signing is blocked if the device accuracy exceeds this value.\n\n- **Required:** When `applyLocationAccuracy` is `true`.",
            "example": 10000
          }
        },
        "description": "GPS location restriction and accuracy configuration for the signer. When enabled, the signer must be within the specified location and accuracy threshold to sign.\n\n**Dashboard Override:** If the workflow toggle \"Allow sender to make changes while running\" is OFF, API values are ignored and dashboard values are used instead."
      },
      "faceMatch": {
        "type": "object",
        "properties": {
          "faceMatchEnabled": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether Face Match is enabled (true) or disabled (false)."
          },
          "faceMatchRetriesConfigured": {
            "type": "integer",
            "description": "Number of additional retry attempts configured beyond the first attempt.\n\nFor example, a value of `3` means the invitee gets 1 original attempt + 3 retries = 4 total face match attempts.\n\nReturns `null` if face match is not enabled."
          }
        }
      },
      "FaceMatchArrayResponseObject": {
        "type": "object",
        "properties": {
          "faceMatchPercentage": {
            "type": "integer",
            "description": "Percentage of similarity between the source image and the image captured by the signer during face match.\n\n**Type:** Integer (e.g., `99`)\n\nReturns `null` if face match is not enabled or if the invitee has not yet completed signing. Only populated after the invitee has signed the document."
          },
          "faceMatchAttemptsLeft": {
            "type": "integer",
            "description": "Number of remaining face match retry attempts. Decrements with **every** attempt (both successful and failed matches).\n\nStarts at the value of `faceMatchRetriesConfigured` and counts down. Returns `null` if face match is not enabled for this invitee."
          },
          "faceMatchError": {
            "type": "string",
            "description": "Error message from the face matching process, if any.\n\nReturns `null` when face match is not enabled, when no error has occurred, or when attempts are still remaining."
          }
        }
      },
      "smartUserLiveliness": {
        "type": "object",
        "properties": {
          "smartUserLivelinessEnabled": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether Smart User Liveliness is enabled for this invitee. `true` if enabled, `false` if not.\n\nReturns `false` when not configured."
          },
          "smartUserLivelinessRetriesConfigured": {
            "type": "integer",
            "description": "Number of additional retry attempts configured beyond the first attempt for Smart User Liveliness.\n\nReturns `null` if Smart User Liveliness is not enabled."
          }
        }
      },
      "SmartUserLivelinessArrayResponseObject": {
        "type": "object",
        "properties": {
          "smartUserLivelinessPercentage": {
            "type": "integer",
            "description": "The percentage achieved by the invitee during Smart User Liveliness verification.\n\nOnly the percentage of the invitee's most recent verification attempt is displayed.\n\n> **Note:** This percentage is only available after the invitee has either signed the document or the invitation has expired. Otherwise, it will return a `null` value."
          },
          "smartUserLivelinessAttemptsLeft": {
            "type": "integer",
            "description": "Number of remaining attempts for the invitee to complete Smart User Liveliness. This value updates with each attempt."
          }
        }
      },
      "AadhaarConfig": {
        "type": "object",
        "properties": {
          "verifyName": {
            "type": "boolean",
            "default": false,
            "description": "Indicates whether the signer's name on the signing certificate must match the name provided in the request."
          },
          "verifySmartName": {
            "type": "boolean",
            "description": "When `true`, returns a percentage similarity score between the certificate name and the provided name. "
          },
          "verifyPincode": {
            "type": "string",
            "description": "PIN code to verify against the signer's certificate. Ignored if the certificate does not contain a PIN code.",
            "pattern": "^[0-9]{6}$",
            "example": "247667"
          },
          "verifyYob": {
            "type": "string",
            "description": "Year of birth to verify against the signer's certificate. Only works for Aadhaar eSign or NESL.\n\n- **Format:** 4-digit year",
            "pattern": "^(19|20)[0-9]{2}$",
            "example": "1998"
          },
          "verifyTitle": {
            "type": "string",
            "description": "Last 4 digits of the signer's Aadhaar UID to verify against the certificate. Only works for Aadhaar eSign or NESL.",
            "pattern": "^[0-9]{4}$",
            "example": "3870"
          },
          "verifyState": {
            "type": "string",
            "description": "State name to verify against the signer's certificate.",
            "example": "Uttarakhand"
          },
          "verifyGender": {
            "type": "string",
            "description": "Gender to verify against the signer's certificate.Only works for Aadhaar eSign or NESL.\n\n- **Allowed:** `M` (Male), `F` (Female), `T` (Transgender)",
            "enum": [
              "M",
              "F"
            ]
          }
        },
        "description": "Aadhaar certificate verification configuration. When enabled, the signer's Aadhaar certificate details are verified against the values provided here before signing.\n\n > On any verification mismatch or failure to meet the threshold, whether the signer can proceed depends on sender's **[Department > eSignature](/document-execution/settings/Department/esignature-settings#configure-certificate-verification-settings)** settings. \n\n- **Dashboard Override:** If a verification field is disabled on the Dashboard, the API value is ignored. If enabled and marked mandatory on the Dashboard, the field becomes required."
      },
      "DscConfig": {
        "type": "object",
        "properties": {
          "verifyName": {
            "type": "boolean",
            "default": false,
            "description": "When `true`, the signer's name in the signing certificate must match the name provided.\n\n- **Note:** If set as mandatory in the Dashboard workflow, this API value is ignored."
          },
          "verifySmartName": {
            "type": "boolean",
            "description": "When `true`, returns a percentage similarity score between the certificate name and the provided name.\n\n- **Note:** If set as mandatory in the Dashboard workflow, this API value is ignored."
          },
          "verifyPincode": {
            "type": "string",
            "description": "PIN code to verify against the signer's certificate. Ignored if the certificate does not contain a PIN code.\n\n- **Note:** If turned off in the Dashboard workflow, this API value is ignored.",
            "example": "247667"
          },
          "verifyState": {
            "type": "string",
            "description": "State name to verify against the signer's certificate. Ignored if the certificate does not contain a state.\n\n- **Note:** If turned off in the Dashboard workflow, this API value is ignored.",
            "example": "Uttarakhand"
          }
        },
        "description": "DSC verification configuration.\n\n > On any verification mismatch or failure to meet the threshold, whether the signer can proceed depends on sender's **[Department > eSignature](/document-execution/settings/Department/esignature-settings#configure-certificate-verification-settings)** settings.\n\n- **Dashboard Override:** If a verification field is disabled on the Dashboard, the API value is ignored. If enabled and marked mandatory on the Dashboard, the field becomes required regardless of the API value."
      },
      "NeslConfig": {
        "type": "object",
        "description": "**Dashboard Override:** If a verification field is disabled on the Dashboard, the API value is ignored. If enabled and marked mandatory on the Dashboard, the field becomes required regardless of the API value.",
        "properties": {
          "verifyName": {
            "type": "boolean",
            "default": false,
            "description": "When `true`, the signer's name in the signing certificate must match the name provided."
          },
          "verifySmartName": {
            "type": "boolean",
            "description": "When `true`, returns a percentage similarity score between the certificate name and the provided name."
          },
          "verifyPincode": {
            "type": "string",
            "description": "PIN code to verify against the signer's certificate. Ignored if the certificate does not contain a PIN code.",
            "example": "247667"
          },
          "verifyYob": {
            "type": "integer",
            "description": "Year of birth to verify against the signer's certificate. \n\n- **Format:** 4-digit year",
            "example": 1998
          },
          "verifyTitle": {
            "type": "string",
            "description": "Last 4 digits of the signer's Aadhaar UID to verify against the certificate.",
            "example": "3870"
          },
          "verifyState": {
            "type": "string",
            "description": "State name to verify against the signer's certificate. Ignored if the certificate does not contain a state.",
            "example": "Uttarakhand"
          },
          "verifyGender": {
            "type": "string",
            "description": "Gender to verify against the signer's certificate. Only works for Aadhaar eSign or NESL.\n\n- **Allowed:** `M` (Male), `F` (Female), `T` (Transgender)",
            "enum": [
              "M",
              "F",
              "T"
            ]
          }
        }
      },
      "stampUpload": {
        "type": "object",
        "required": [
          "state",
          "denomination",
          "firstPartyName",
          "secondPartyName",
          "stampSerial",
          "stampFile"
        ],
        "properties": {
          "state": {
            "type": "string",
            "description": "Name of the state for the uploaded stamp paper.",
            "example": "Maharashtra"
          },
          "denomination": {
            "type": "string",
            "description": "Denomination of the uploaded stamp paper.",
            "example": "100"
          },
          "firstPartyName": {
            "type": "string",
            "description": "Name of the first party on the uploaded stamp paper.",
            "example": "ABC Pvt Ltd"
          },
          "secondPartyName": {
            "type": "string",
            "description": "Name of the second party on the uploaded stamp paper.",
            "example": "XYZ Corporation"
          },
          "stampSerial": {
            "type": "string",
            "description": "Serial number of the uploaded stamp paper.",
            "example": "IN-KA20230012345"
          },
          "stampFile": {
            "type": "string",
            "description": "Base64-encoded string of the stamp paper to upload.\n\n- **Format:** Base64-encoded PDF",
            "example": "JVBERi0xLjQKJeLjz9MK..."
          }
        },
        "description": "Configuration for uploading physical stamp paper. Required when the workflow uses **upload stamp paper**. All fields are required when this object is provided."
      },
      "Nesl": {
        "type": "object",
        "properties": {
          "documentDetail": {
            "$ref": "#/components/schemas/NeslDocument"
          },
          "stampData": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NeslStamp"
            }
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NeslParticipants"
            }
          },
          "neslParties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NeslParties"
            }
          },
          "neslSecurities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NeslSecurities"
            }
          }
        }
      },
      "NeslDocument": {
        "type": "object",
        "required": [
          "registrationType",
          "state"
        ],
        "properties": {
          "loanNumber": {
            "type": "string",
            "description": "The loan number associated with the debt. Mandatory for Individual, non-individual loans and eBG"
          },
          "sanctionNumber": {
            "type": "string",
            "description": "The sanction number associated with the debt. Mandatory for Individual, non-individual loans and eBG"
          },
          "registrationType": {
            "type": "string",
            "description": "Type of debt (Individual Loan or Non-Individual Loan) or eBG\nAccepted values are- INDIVIDUAL_LOAN, NON_INDIVIDUAL_LOAN, non_lending, EBG",
            "enum": [
              "INDIVIDUAL_LOAN",
              "NON_INDIVIDUAL_LOAN",
              "NON_LENDING",
              "EBG"
            ]
          },
          "state": {
            "type": "string",
            "description": "The state in which stamp duty is being paid."
          },
          "branchName": {
            "type": "string",
            "description": "The name of the branch granting the loan."
          },
          "branchAddress": {
            "type": "string",
            "description": "The address of the branch granting the loan."
          },
          "dateOfSanction": {
            "type": "string",
            "description": "The date on which the loan was sanctioned as per the lender's CBS. Mandatory for Individual and non-individual loans.",
            "example": "2018-02-02"
          },
          "emiAmount": {
            "type": "string",
            "description": "Interest installment amount payable on the loan. Mandatory for Individual and non-individual loans."
          },
          "rateOfInterest": {
            "type": "string",
            "description": "Rate of Interest on the loan. Mandatory for Individual and non-individual loans."
          },
          "sanctionAmount": {
            "type": "string",
            "description": "The amount sanctioned by the financial creditor. Mandatory for Individual, non-individual loans and eBG"
          },
          "tenure": {
            "type": "string",
            "description": "The tenure of the loan. Mandatory for Individual and non-individual loans."
          },
          "typeOfDebt": {
            "type": "string",
            "description": "The type of loan (financial debt or operational debt). Mandatory for Individual, non-individual loans and eBG\nAccepted values are- FINANCIAL, OPERATIONAL.",
            "enum": [
              "FINANCIAL",
              "OPERATIONAL"
            ]
          },
          "accountClosedFlag": {
            "type": "string",
            "description": "Whether the account is closed (yes, no, or assigned debt). Mandatory for Individual, non-individual loans and eBG\nAccepted values are- YES, NO, ASSIGNED.",
            "enum": [
              "YES",
              "NO",
              "ASSIGNED"
            ]
          },
          "fundType": {
            "type": "string",
            "description": "Whether the credit facility is funded or non funded. Mandatory for Individual, non-individual loans and eBG\nAccepted values are- FUNDED, NON_FUNDED.",
            "enum": [
              "FUNDED",
              "NON_FUNDED"
            ]
          },
          "sanctionCurrency": {
            "type": "string",
            "description": "The currency in which the loan is denominated (INR). Mandatory for Individual, non-individual loans and eBG.\nAccepted values are- INR",
            "enum": [
              "INR"
            ]
          },
          "creditSubtype": {
            "type": "string",
            "description": "Whether the financial debt is created pursuant to a credit facility or the purchase of a property. Mandatory for Individual, non-individual loans and eBG\nAccepted values are- CREDIT_FACILITY, PROPERTY_BUYER, GRANT",
            "enum": [
              "CREDIT_FACILITY",
              "PROPERTY_BUYER",
              "HYBRID_EBG"
            ]
          },
          "facilityName": {
            "type": "string",
            "description": "The name of the loan facility. Mandatory for Individual and non-individual loans."
          },
          "amountOverdue": {
            "type": "string",
            "description": "The amount overdue on the loan."
          },
          "otherChargeAmount": {
            "type": "string",
            "description": "Any other charges (if applicable)."
          },
          "debtStartDate": {
            "type": "string",
            "description": "The date on which the financial debt started."
          },
          "interestAmount": {
            "type": "string",
            "description": "The amount of interest."
          },
          "oldDebtRefNo": {
            "type": "string",
            "description": "The old debt reference number (applicable in case there is a change in the debt reference number)."
          },
          "principalOutstanding": {
            "type": "string",
            "description": "The outstanding principal amount."
          },
          "loanRemark": {
            "type": "string",
            "description": "Loan remarks (if any)."
          },
          "totalOutstandingAmount": {
            "type": "string",
            "description": "Total outstanding amount."
          },
          "creditorBusinessUnit": {
            "type": "string",
            "description": "The business unit of the creditor providing the debt (such as SME, Retail etc)."
          },
          "drawingPower": {
            "type": "string",
            "description": "The drawing power of the loan."
          },
          "daysPastDue": {
            "type": "string",
            "description": "The number of days past due date."
          },
          "docRefNo": {
            "type": "string",
            "description": "This parameter is applicable only for Non-Lending Flow. An alphanumeric document reference number can be added in this parameter which will be stored in the IU. Note- This is a mandatory parameter for Non-lending flow."
          },
          "expiryDateEbg": {
            "type": "string",
            "description": "The Expiry Date of eBG in \"yyyy-MM-dd\" format. Mandatory for eBG"
          },
          "claimExpiryDate": {
            "type": "string",
            "description": "The Claim Expiry Date of eBG in \"yyyy-MM-dd\" format. Mandatory for eBG"
          },
          "contractRefNo": {
            "type": "string",
            "description": "Vendor Contract Reference Number"
          },
          "vendorCode": {
            "type": "string",
            "description": "Vendor Code"
          },
          "portalId": {
            "type": "string",
            "description": "Portal ID as assigned to the Creditor by NeSL"
          },
          "event": {
            "type": "string",
            "description": "Specifies the type of electronic Bank Guarantee (eBG) event. This field is **required** if `registrationType` is set to EBG. Allowed values are:\n\n- Issuance \n- Amendment \n- Partial_invocation \n- Invocation \n- Cancellation \n- Closure \n- Renewal \n- Court_injunction"
          }
        }
      },
      "NeslStamp": {
        "type": "object",
        "required": [
          "firstParty",
          "secondParty",
          "stampDutyAmount",
          "considerationPrice",
          "descriptionOfDocument",
          "stampDutyPaidBy",
          "articleCode"
        ],
        "properties": {
          "firstParty": {
            "type": "string",
            "description": "The name of the first party (for the stamp paper)."
          },
          "secondParty": {
            "type": "string",
            "description": "The name of the second party (for the stamp paper)."
          },
          "stampDutyAmount": {
            "type": "string",
            "description": "The stamp duty amount.\n**Note:** For West Bengal, Maharashtra, Madhya Pradesh, Kerala, and Telangana, the stamp duty is automatically calculated based on the considerationPrice and will override the value passed in this parameter, if there is a difference between the two."
          },
          "considerationPrice": {
            "type": "string",
            "description": "The consideration price for the purposes of stamp duty."
          },
          "descriptionOfDocument": {
            "type": "string",
            "description": "The description of the document for the purposes of stamp duty."
          },
          "stampDutyPaidBy": {
            "type": "string",
            "description": "The name of the party paying the stamp duty."
          },
          "articleCode": {
            "type": "string",
            "description": "Article code for payment of stamp duty."
          },
          "firstPartyPin": {
            "type": "string",
            "description": "The pincode of the first party (for the stamp paper). This is mandatory for the states of Madhya Pradesh & West Bengal."
          },
          "secondPartyPin": {
            "type": "string",
            "description": "The pincode of the second party (for the stamp paper). This is mandatory for the states of Madhya Pradesh & West Bengal."
          },
          "firstPartyOVDType": {
            "type": "string",
            "description": "The OVD Type of the first party (for the stamp paper). This will be List of values. This is mandatory for the states of West Bengal. Accepted values are - PAN_CARD, DRIVING_LICENSE, VOTER_ID, PASSPORT, ANY_OTHER_OFFICIAL_ID.",
            "enum": [
              "PAN_CARD",
              "DRIVING_LICENSE",
              "VOTER_ID",
              "PASSPORT",
              "ANY_OTHER_OFFICIAL_ID"
            ]
          },
          "firstPartyOVDValue": {
            "type": "string",
            "description": "The OVD Value of the first party (for the stamp paper). This is mandatory for the states of West Bengal."
          },
          "secondPartyOVDType": {
            "type": "string",
            "description": "The OVD Type of the second party (for the stamp paper). This will be List of values. This is mandatory for the states of West Bengal. Accepted values are - PAN_CARD, DRIVING_LICENSE, VOTER_ID, PASSPORT, ANY_OTHER_OFFICIAL_ID.",
            "enum": [
              "PAN_CARD",
              "DRIVING_LICENSE",
              "VOTER_ID",
              "PASSPORT",
              "ANY_OTHER_OFFICIAL_ID"
            ]
          },
          "secondPartyOVDValue": {
            "type": "string",
            "description": "The OVD Value of the second party (for the stamp paper). This is mandatory for the states of West Bengal."
          }
        }
      },
      "NeslParticipants": {
        "type": "object",
        "description": "NeSL participant details. The number of participants must equal the number of NeSL-type invitees in the request. The first participant (matching the first NeSL invitee) must have contactRelation set to `DEBTOR`.\n\nFor `NON_INDIVIDUAL_LOAN`, participants additionally require: registeredAddress, registeredPinCode, communicationAddress, communicationAddressPinCode, and a company PAN (4th letter C or E in officialDocId).",
        "required": [
          "fullName",
          "emailId",
          "contactRelation",
          "mobileNumber",
          "dob",
          "legalConstitution",
          "officialDocType",
          "officialDocId",
          "partyType"
        ],
        "properties": {
          "fullName": {
            "type": "string",
            "description": "Full name of the Party."
          },
          "contactPersonName": {
            "type": "string",
            "description": "Full name of the contact person of the Party."
          },
          "contactRelation": {
            "type": "string",
            "description": "Relation of the party to the debt (Debtor, Guarantor, Co-obligant, Beneficiary, Creditor).\nAccepted values are- CREDITOR, DEBTOR, GUARANTOR, CO_OBLIGANT, SECURITY_PROVIDER, ASSIGNEE, BENEFICIARY.",
            "enum": [
              "CREDITOR",
              "DEBTOR",
              "GUARANTOR",
              "CO_OBLIGANT",
              "SECURITY_PROVIDER",
              "ASSIGNEE",
              "BENEFICIARY"
            ]
          },
          "emailId": {
            "type": "string",
            "description": "Email ID of the signer."
          },
          "mobileNumber": {
            "type": "string",
            "description": "Mobile Number of the signer.",
            "example": "9876543210"
          },
          "dob": {
            "type": "string",
            "description": "Date of Birth/Incorporation.",
            "example": "1990-05-15"
          },
          "legalConstitution": {
            "type": "string",
            "description": "Legal constitution of the signer (Resident Individual, Private Limited, Public Limited, LLP, Proprietorship, Partnership, Entity created by Statute, Trust, HUF, Coop Society, Association of Persons, Government, Self Help Groups, Non-Resident, Foreign Company).\nAccepted values are- RESIDENT_INDIVIDUAL, PUBLIC_LTD, PRIVATE_LTD, LLP, PROPRIETORSHIP, PARTNERSHIP, ENTITY_CREATED_BY_STATUTE, TRUST, HUF, CO_OP_SOCIETY, ASSOCIATION_OF_PERSONS, GOVERNMENT, SELF_HELP_GROUP, NON_RESIDENT, FOREIGN_COMPANY.",
            "enum": [
              "RESIDENT_INDIVIDUAL",
              "PUBLIC_LTD",
              "PRIVATE_LTD",
              "LLP",
              "PROPRIETORSHIP",
              "PARTNERSHIP",
              "ENTITY_CREATED_BY_STATUTE",
              "TRUST",
              "HUF",
              "CO_OP_SOCIETY",
              "ASSOCIATION_OF_PERSONS",
              "GOVERNMENT",
              "SELF_HELP_GROUP",
              "NON_RESIDENT",
              "FOREIGN_COMPANY"
            ]
          },
          "alternateEmailId": {
            "type": "string",
            "description": "Alternate email ID of the signer."
          },
          "alternateMobileNumber": {
            "type": "string",
            "description": "Alternate mobile of the signer."
          },
          "officialDocType": {
            "type": "string",
            "description": "Official Document Type (Pan Card, Driving License, Voter ID, Passport, Others).\nAccepted values are- PAN_CARD, DRIVING_LICENSE, VOTER_ID, PASSPORT, ANY_OTHER_OFFICIAL_ID.",
            "enum": [
              "PAN_CARD",
              "DRIVING_LICENSE",
              "VOTER_ID",
              "PASSPORT",
              "ANY_OTHER_OFFICIAL_ID"
            ]
          },
          "officialDocId": {
            "type": "string",
            "description": "Official Document ID."
          },
          "registeredAddress": {
            "type": "string",
            "description": "Registered address of the signer."
          },
          "registeredPinCode": {
            "type": "string",
            "description": "PIN code of the registered address of the signer."
          },
          "designation": {
            "type": "string",
            "description": "Designation of the signer (relevant in case of corporate entities)."
          },
          "communicationAddress": {
            "type": "string",
            "description": "Communication address of the signer."
          },
          "communicationAddressPinCode": {
            "type": "string",
            "description": "PIN code of the communication address of the signer."
          },
          "cin": {
            "type": "string",
            "description": "Corporate Identification Number (relevant in case of corporate entities)."
          },
          "kin": {
            "type": "string",
            "description": "KYC Identification Number of signer."
          },
          "partyType": {
            "type": "string",
            "description": "Type of Party (Indian entity/ Resident Individual/ Foreign Entity/ NRI/Foreign Individual.\nAccepted values are- INDIAN_ENTITY, RESIDENT_INDIVIDUAL, FOREIGN_ENTITY, NRI.",
            "enum": [
              "INDIAN_ENTITY",
              "RESIDENT_INDIVIDUAL",
              "FOREIGN_ENTITY",
              "NRI"
            ]
          },
          "isIndividual": {
            "type": "string",
            "description": "Whether the participant is individual or not Accepted values are - YES, NO",
            "enum": [
              "YES",
              "NO"
            ]
          },
          "signatoryGender": {
            "type": "string",
            "description": "Gender of the participant Accepted values are - MALE, FEMALE",
            "enum": [
              "MALE",
              "FEMALE"
            ]
          },
          "businessUnit": {
            "type": "string",
            "description": "Business Unit Code of the party. It is an alphanumeric string with a maximum length of 30 characters. (Only for eBG)"
          }
        }
      },
      "NeslParties": {
        "type": "object",
        "required": [
          "fullName",
          "contactPersonName",
          "contactRelation",
          "emailId",
          "mobileNumber",
          "dob",
          "legalConstitution",
          "officialDocType",
          "officialDocId",
          "partyType"
        ],
        "properties": {
          "fullName": {
            "type": "string",
            "description": "Full name of the Party."
          },
          "contactPersonName": {
            "type": "string",
            "description": "Full name of the contact person of the Party."
          },
          "contactRelation": {
            "type": "string",
            "description": "Relation of the party to the debt (Debtor, Guarantor, Co-obligant, Beneficiary, Creditor).\nAccepted values are- CREDITOR, DEBTOR, GUARANTOR, CO_OBLIGANT, SECURITY_PROVIDER, ASSIGNEE, BENEFICIARY.",
            "enum": [
              "CREDITOR",
              "DEBTOR",
              "GUARANTOR",
              "CO_OBLIGANT",
              "SECURITY_PROVIDER",
              "ASSIGNEE",
              "BENEFICIARY"
            ]
          },
          "emailId": {
            "type": "string",
            "description": "Email ID of the signer."
          },
          "mobileNumber": {
            "type": "string",
            "description": "Mobile Number of the signer.",
            "example": "9876543210"
          },
          "dob": {
            "type": "string",
            "description": "Date of Birth/Incorporation.",
            "example": "1990-05-15"
          },
          "legalConstitution": {
            "type": "string",
            "description": "Legal constitution of the signer (Resident Individual, Private Limited, Public Limited, LLP, Proprietorship, Partnership, Entity created by Statute, Trust, HUF, Coop Society, Association of Persons, Government, Self Help Groups, Non-Resident, Foreign Company).\nAccepted values are- RESIDENT_INDIVIDUAL, PUBLIC_LTD, PRIVATE_LTD, LLP, PROPRIETORSHIP, PARTNERSHIP, ENTITY_CREATED_BY_STATUTE, TRUST, HUF, CO_OP_SOCIETY, ASSOCIATION_OF_PERSONS, GOVERNMENT, SELF_HELP_GROUP, NON_RESIDENT, FOREIGN_COMPANY.",
            "enum": [
              "RESIDENT_INDIVIDUAL",
              "PUBLIC_LTD",
              "PRIVATE_LTD",
              "LLP",
              "PROPRIETORSHIP",
              "PARTNERSHIP",
              "ENTITY_CREATED_BY_STATUTE",
              "TRUST",
              "HUF",
              "CO_OP_SOCIETY",
              "ASSOCIATION_OF_PERSONS",
              "GOVERNMENT",
              "SELF_HELP_GROUP",
              "NON_RESIDENT",
              "FOREIGN_COMPANY"
            ]
          },
          "alternateEmailId": {
            "type": "string",
            "description": "Alternate email ID of the signer."
          },
          "alternateMobileNumber": {
            "type": "string",
            "description": "Alternate mobile of the signer."
          },
          "officialDocType": {
            "type": "string",
            "description": "Official Document Type (Pan Card, Driving License, Voter ID, Passport, Others).\nAccepted values are- PAN_CARD, DRIVING_LICENSE, VOTER_ID, PASSPORT, ANY_OTHER_OFFICIAL_ID.",
            "enum": [
              "PAN_CARD",
              "DRIVING_LICENSE",
              "VOTER_ID",
              "PASSPORT",
              "ANY_OTHER_OFFICIAL_ID"
            ]
          },
          "officialDocId": {
            "type": "string",
            "description": "Official Document ID."
          },
          "registeredAddress": {
            "type": "string",
            "description": "Registered address of the signer."
          },
          "registeredPinCode": {
            "type": "string",
            "description": "PIN code of the registered address of the signer."
          },
          "designation": {
            "type": "string",
            "description": "Designation of the signer (relevant in case of corporate entities)."
          },
          "communicationAddress": {
            "type": "string",
            "description": "Communication address of the signer."
          },
          "communicationAddressPinCode": {
            "type": "string",
            "description": "PIN code of the communication address of the signer."
          },
          "cin": {
            "type": "string",
            "description": "Corporate Identification Number (relevant in case of corporate entities)."
          },
          "kin": {
            "type": "string",
            "description": "KYC Identification Number of signer."
          },
          "partyType": {
            "type": "string",
            "description": "Type of Party (Indian entity/ Resident Individual/ Foreign Entity/ NRI/Foreign Individual.\nAccepted values are- INDIAN_ENTITY, RESIDENT_INDIVIDUAL, FOREIGN_ENTITY, NRI.",
            "enum": [
              "INDIAN_ENTITY",
              "RESIDENT_INDIVIDUAL",
              "FOREIGN_ENTITY",
              "NRI"
            ]
          },
          "isIndividual": {
            "type": "string",
            "description": "Whether the parties is individual or not. Mandatory for eBG Accepted values are - YES, NO",
            "enum": [
              "YES",
              "NO"
            ]
          },
          "signatoryGender": {
            "type": "string",
            "description": "Gender of the participant Accepted values are - MALE, FEMALE",
            "enum": [
              "MALE",
              "FEMALE"
            ]
          }
        },
        "description": "Additional NeSL party details for non-signing parties involved in the transaction. Unlike participants, neslParties do not need to match invitees."
      },
      "NeslSecurities": {
        "type": "object",
        "required": [
          "securityDescription",
          "assetsType",
          "chargeType",
          "assetId"
        ],
        "properties": {
          "securityDescription": {
            "type": "string",
            "description": "Description of security."
          },
          "assetsType": {
            "type": "string",
            "description": "Type of asset forming security (Movable, Immovable, Intangible, Not Classified).\nAccepted values are- MOVABLE, IMMOVABLE, INTANGIBLE, NOT_CLASSIFIED.",
            "enum": [
              "MOVABLE",
              "IMMOVABLE",
              "INTANGIBLE",
              "NOT_CLASSIFIED"
            ]
          },
          "chargeType": {
            "type": "string",
            "description": "Type of charge created (Mortgage, Hypothecation, Charge, Assignment, Pledge, Lien, Negative Lien, Guarantee, Others, Not Classified).\nAccepted values are- MORTGAGE, HYPOTHECATION, CHARGE, ASSIGNMENT, PLEDGE, LIEN, NEGATIVE_LIEN, GUARANTEE, OTHERS, NOT_CLASSIFIED.",
            "enum": [
              "MORTGAGE",
              "HYPOTHECATION",
              "CHARGE",
              "ASSIGNMENT",
              "PLEDGE",
              "LIEN",
              "NEGATIVE_LIEN",
              "GUARANTEE",
              "OTHERS",
              "NOT_CLASSIFIED"
            ]
          },
          "assetId": {
            "type": "string",
            "description": "Asset ID of the Security (used internally by the lender)."
          },
          "doc": {
            "type": "string",
            "description": "Date of creation of security."
          },
          "dov": {
            "type": "string",
            "description": "Date of valuation of security."
          },
          "cersaiId": {
            "type": "string",
            "description": "CERSAI ID of security created."
          },
          "rocChargeId": {
            "type": "string",
            "description": "ROC ID for security created."
          },
          "securityValue": {
            "type": "string",
            "description": "Value of security."
          },
          "abc": {
            "type": "string",
            "description": "Asset ID of the Security (used internally by the lender)."
          }
        }
      },
      "ReactivateRequest": {
        "type": "object",
        "required": [
          "documentId"
        ],
        "description": "Request body for reactivating an expired document.\n\nPass either `expiryDays` or `expiryTime` to set the new expiry period. If neither is provided, the API uses the default expiry from the workflow configuration.",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Unique identifier of the expired document to reactivate.\n\n**Format:** Alphanumeric string.\n\nThe document must have at least one invitation with `expired: true` status.",
            "example": "01KJCHYRSQGA24YDZ044BS6MTS"
          },
          "expiryDays": {
            "type": "integer",
            "description": "New expiry period as a relative number of days.\n\n**Range:** `-1` to `365`\n\n| Value | Meaning |\n|---|---|\n| `-1` | Expires in 45 minutes |\n| `0` | Expires same day at 11:59 PM |\n| `1` | Expires next day at 11:59 PM |\n| `2`\u2013`365` | Expires in N days at 11:59 PM |\n\nUse this for simple relative expiry. For a specific date/time, use `expiryTime` instead.",
            "minimum": -1,
            "maximum": 365,
            "example": 5
          },
          "expiryTime": {
            "type": "integer",
            "format": "int64",
            "description": "This is used to define the new timeout time after which an uncompleted transaction get cancelled and reversed. Maximum value can be equal to 365 days. Value in this parameter to be passed as long format of date.",
            "example": 1773576000000
          }
        }
      },
      "ResendApiRequest": {
        "type": "object",
        "required": [
          "signUrls"
        ],
        "properties": {
          "signUrls": {
            "minimum": 1,
            "maximum": 15,
            "type": "array",
            "items": {
              "type": "string",
              "description": "A signing URL that should be re-notified. Pass at least one signURL in the array.\n\n- **Format:** Full signing URL as returned in the Create eSigning Request response.\n- **Constraints:** Minimum 1, maximum 15 entries."
            }
          }
        }
      },
      "DocumentCompleteApiRequest": {
        "type": "object",
        "required": [
          "documentId"
        ],
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Unique identifier of the document to mark as complete.\n\n- **Required**\n- **Format:** Alphanumeric string."
          }
        }
      },
      "DocsignerSigningApiRequest": {
        "type": "object",
        "required": [
          "signUrl",
          "profileId",
          "consent"
        ],
        "properties": {
          "signUrl": {
            "type": "string",
            "description": "The signing URL of the invitation to eSign.\n\n- **Required**\n\nObtain the signUrl from the response of the Create eSigning Request API. The signing URL must have Docsigner enabled, and the invitation must be active and unsigned."
          },
          "profileId": {
            "type": "string",
            "description": "The unique identifier of the Docsigner profile saved in the signer's Leegality dashboard.\n\n- **Required**\n\nFind this by logging into the signer's Dashboard and navigating to: **Settings > eSignature & Seal > Document Signer Certificate**.\n\n> **Note:** This can be any valid Docsigner profile \u2014 whether hosted on Leegality's server or the client's own server."
          },
          "consent": {
            "type": "string",
            "description": "Consent string confirming agreement to eSign using the Docsigner certificate.\n\n- **Required**\n\nPass the exact string below \u2014 any changes will cause a failure:\n\n`\"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.\"`"
          }
        }
      },
      "Invitee": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Full name of the invitee.\n\n- **Maximum Length:** 255 Characters",
            "maxLength": 255
          },
          "email": {
            "type": "string",
            "description": "Email address of the invitee.\n\n- **Required:** At least one of `email` or `phone` must be provided.\n- **Format:** `johndoe@example.com`"
          },
          "phone": {
            "type": "string",
            "description": "Mobile number of the invitee.\n\n- **Required:** At least one of `email` or `phone` must be provided.\n- **Format:** 10-digit mobile number",
            "pattern": "^[0-9]{10}$"
          },
          "groupId": {
            "type": "string",
            "description": "Group ID for the invitee when using the Group Invitee feature. Find this value in the API payload downloaded from your Dashboard.\n\n- **Required:** When signing from a group."
          },
          "groupName": {
            "type": "string",
            "description": "Group name for the invitee when using the Group Invitee feature. Auto-filled if configured in the Dashboard workflow.\n\n- **Required:** When signing from a group."
          },
          "completionThreshold": {
            "type": "string",
            "description": "Completion threshold for the group. Auto-filled if configured in the Dashboard workflow.\n\n- **Required:** When signing from a group."
          },
          "organizationName": {
            "type": "string",
            "description": "Organization name of the signer.\n\n- **Required:** When the workflow is configured to use organizational signatures."
          },
          "defaultLanguageSelect": {
            "type": "string",
            "description": "Language for the signing journey presented to this invitee.\n\n- **Allowed:** `ENGLISH`, `HINDI`, `MARATHI`, `GUJARATI`, `BENGALI`, `MALAYALAM`, `TAMIL`, `TELUGU`, `KANNADA`, `ODIA`",
            "enum": [
              "ENGLISH",
              "HINDI",
              "MARATHI",
              "GUJARATI",
              "BENGALI",
              "MALAYALAM",
              "TAMIL",
              "TELUGU",
              "KANNADA",
              "ODIA"
            ],
            "example": "ENGLISH"
          },
          "faceMatchImage": {
            "type": "string",
            "description": "Reference image for face match verification.\n\n- **Required:** When face match is enabled in the workflow configuration. Omitting this when face match is enabled will return an error.\n- **Format:** Base64-encoded image"
          },
          "workflowPaymentCollectionConfig": {
            "$ref": "#/components/schemas/workflowPaymentCollectionConfig"
          },
          "gpsConfig": {
            "$ref": "#/components/schemas/gpsConfig"
          },
          "aadhaarConfig": {
            "$ref": "#/components/schemas/AadhaarConfig"
          },
          "dscConfig": {
            "$ref": "#/components/schemas/DscConfig"
          },
          "neslConfig": {
            "$ref": "#/components/schemas/NeslConfig"
          }
        },
        "description": "Represents a single signer or approver in the eSigning workflow. Each invitee receives a unique signing URL and can be configured with signature verification, GPS restrictions, and face matching."
      },
      "Cc": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Full name of the CC recipient.",
            "example": "Finance Team"
          },
          "email": {
            "type": "string",
            "description": "Email address of the CC recipient. The recipient will receive a copy of the signed document.\n\n- **Format:** Valid email address.",
            "example": "finance@example.com"
          }
        },
        "description": "Carbon Copy recipient who receives a copy of the signed document via email after all signers complete their action.",
        "required": [
          "name",
          "email"
        ]
      },
      "RequestApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "Indicates success (`1`) or failure (`0`).",
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "description": "Array of message objects containing success, error, or warning details.\n\nOn success, contains `{\"code\": \"simpleWorkFlow.success\", \"message\": \"Invitations sent successfully.\"}`.\n\n Also contain warning messages even on success (e.g., when dashboard overrides API values)."
          },
          "data": {
            "type": "object",
            "properties": {
              "documentId": {
                "type": "string",
                "description": "Unique Leegality ID for this eSigning request.",
                "example": "01KJPV67NZQFX5P2JRTSPSFKYY"
              },
              "irn": {
                "type": "string",
                "description": "Internal Reference Number set for this document.",
                "example": "LOAN-2024-00142"
              },
              "invitees": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Request"
                },
                "description": "Array of invitee objects with their signing URLs and status.\n\nIncludes all invitees \u2014 both from the API request and any auto-added from dashboard configuration."
              }
            },
            "description": "Response data containing the document ID and invitee details.\n\nReturns an empty object `{}` when `status` is `0` (failure)."
          }
        },
        "description": "Response returned by the Create eSigning Request endpoint. Contains the document ID, invitee signing URLs, and status/message details."
      },
      "ReactivateApiResponse": {
        "type": "object",
        "description": "Response wrapper for the Reactivate Document API.\n\nOn success (`status: 1`), `data` contains the document ID, IRN, and updated invitee statuses.\n\nOn failure (`status: 0`), `data` is an empty object and `messages` contains the error details.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages.\n\n**Success codes:**\n- `signinvitation.activate.success` \u2014 Invitation activated successfully\n\n**Error codes:**\n- `no.expired.invitation.found` \u2014 No expired invitation exists (document is completed, rejected, active, or already reactivated)\n- `no.document.found` \u2014 Document ID does not exist\n- `invalid.expiry.days.value` \u2014 expiryDays is outside the valid range (-1 to 365)\n- `invalid.expiry.time` \u2014 expiryTime is in the past or negative\n- `invalid.expiry.time.maxerror` \u2014 expiryTime exceeds 365 days from now",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/ReactivateData"
          }
        }
      },
      "DocumentCompleteApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "DocsignerSigningApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "InvitationDeleteApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "DocumentDetailsApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "description": "Base64 encoded PDF of the document.\n\nReturns `null` if disabled via the `file` request parameter."
              },
              "auditTrail": {
                "type": "string",
                "description": "Base64 encoded digitally signed audit trail.\n\nReturns a value only if the document is completed and the `auditTrail` request parameter is enabled. Returns `null` otherwise."
              },
              "documentId": {
                "type": "string",
                "description": "Leegality-generated unique Document ID."
              },
              "documentName": {
                "type": "string",
                "description": "Document name provided by the client."
              },
              "workflowId": {
                "type": "string",
                "description": "Leegality-generated unique Workflow ID. Present only if the document was generated from a workflow."
              },
              "workflowName": {
                "type": "string",
                "description": "Workflow name provided by the client. Present only if the document was generated from a workflow."
              },
              "irn": {
                "type": "string",
                "description": "Internal reference number provided by the client."
              },
              "status": {
                "type": "string",
                "description": "Current status of the document.\n\n**Possible values:** `DRAFT`, `SENT`, `COMPLETED`, `EXPIRED`"
              },
              "creationDate": {
                "type": "string",
                "description": "Creation date of the document.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
              },
              "completionDate": {
                "type": "string",
                "description": "Completion date of the document. Returns `null` if the document is not yet completed.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
              },
              "deletionDate": {
                "type": "string",
                "description": "Deletion date of the document. Present only if the `deleteOnComplete` functionality is enabled.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
              },
              "senderName": {
                "type": "string",
                "description": "Full name of the sender."
              },
              "senderUsername": {
                "type": "string",
                "description": "Email address or phone number of the sender."
              },
              "folders": {
                "type": "array",
                "description": "Folder hierarchy for the document. The last child folder appears first in the array, with parent folders following.\n\nReturns an empty array if the document is not in any folder.",
                "items": {
                  "$ref": "#/components/schemas/FolderArrayResponseObject"
                }
              },
              "stamp": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/StampArrayResponseObject"
                }
              },
              "attachments": {
                "type": "array",
                "description": "Attachments uploaded by the sender. Returned only when enabled via the `attachment` request parameter.",
                "items": {
                  "$ref": "#/components/schemas/AttachmentsArrayResponseObject"
                }
              },
              "invitations": {
                "type": "array",
                "description": "List of all signers (invitees) for this document.",
                "items": {
                  "$ref": "#/components/schemas/InvitationsArrayResponseObject"
                }
              }
            }
          }
        }
      },
      "DocumentDetails3_1ApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "description": "Base64 encoded PDF file, If you disable this parameter using file key while API call, You will receive value as null."
              },
              "auditTrail": {
                "type": "string",
                "description": "Base64 encoded digitally signed audit trail, You will receive value of this parameter only if document is completed and you        enable the same using auditTrail key while API call otherwise you will receive value as NULL."
              },
              "document": {
                "$ref": "#/components/schemas/DocumentDetails3_1ResponseObject"
              },
              "sftp": {
                "$ref": "#/components/schemas/SftpDetails3_1ResponseObject"
              },
              "workflow": {
                "$ref": "#/components/schemas/WorkflowDetails3_1ResponseObject"
              },
              "template": {
                "$ref": "#/components/schemas/TemplateDetails3_1ResponseObject"
              },
              "account": {
                "$ref": "#/components/schemas/AccountDetails3_1ResponseObject"
              },
              "sender": {
                "$ref": "#/components/schemas/SenderDetails3_1ResponseObject"
              },
              "folders": {
                "type": "array",
                "description": "You will receive the whole hierarchy of folders created with leegality, in order of last child folder as first element of array and parent folders goes after child folder in the array.",
                "items": {
                  "$ref": "#/components/schemas/FolderArrayResponseObject"
                }
              },
              "stampDetails": {
                "$ref": "#/components/schemas/StampDetails3_1ResponseObject"
              },
              "referenceAttachments": {
                "type": "array",
                "description": "Attachments that are uploaded by the sender of the document visible during the signing journey.",
                "items": {
                  "$ref": "#/components/schemas/AttachmentsArrayResponseObject"
                }
              },
              "neslDocumentDetails": {
                "$ref": "#/components/schemas/NeslDetails3_1ResponseObject"
              },
              "cc": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CCArrayResponseObject"
                }
              },
              "coordinatePicker": {
                "$ref": "#/components/schemas/CoordinatePickerDetails3_1ResponseObject"
              },
              "invitations": {
                "type": "array",
                "description": "This parameter contains the list of all the signers.",
                "items": {
                  "$ref": "#/components/schemas/InvitationsArray3_1ResponseObject"
                }
              }
            }
          }
        }
      },
      "DocumentDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Document ID generated by Leegality for every document."
          },
          "name": {
            "type": "string",
            "description": "Document name as configured during creation."
          },
          "irn": {
            "type": "string",
            "description": "Internal Reference Number (IRN) assigned to the document during creation."
          },
          "status": {
            "type": "string",
            "description": "Current status of the document.\n\n- `DRAFT` \u2014 Document created but not yet sent for signing\n- `SENT` \u2014 Document sent for signing, signing in progress\n- `COMPLETED` \u2014 All required signers have signed the document"
          },
          "coordinatePicker": {
            "type": "boolean",
            "description": "Indicates whether coordinate picker is enabled for this document."
          },
          "deleted": {
            "type": "boolean",
            "description": "Indicates whether the document has been deleted. `true` if deleted, `false` otherwise."
          },
          "creationDate": {
            "type": "string",
            "description": "Document creation date.\n\n- **Format:** `DD-MM-YYYY HH:MM:SS`"
          },
          "completionDate": {
            "type": "string",
            "description": "Document completion date \u2014 when all signers have completed their signatures.\n\n- **Format:** `DD-MM-YYYY HH:MM:SS`"
          },
          "scheduledDeletionDate": {
            "type": "string",
            "description": "Scheduled deletion date for the document.\n\n- **Format:** `DD-MM-YYYY HH:MM:SS`\n\nOnce completed, calculated as `completionDate + retention period` configured in the \"Auto Delete on Complete\" settings."
          },
          "customMessage": {
            "type": "string",
            "description": "Custom message configured for the invitation email sent to signers. Returns `null` if no custom message was configured."
          },
          "deleteOnComplete": {
            "type": "boolean",
            "description": "Indicates whether the document is set for automatic deletion after completion.\n\n- `true` \u2014 deletion enabled\n- `false` \u2014 deletion not enabled"
          },
          "requestSigningOrder": {
            "type": "boolean",
            "description": "Indicates whether the signature links are activated sequentially.\n\n- `true` \u2014 sequential signing enabled; next signer receives link only after previous signer has signed\n- `false` \u2014 sequential signing disabled"
          },
          "requireSigningOrder": {
            "type": "boolean",
            "description": "Indicates whether signing order is strictly required.\n\n- `true` \u2014 signing order required\n- `false` \u2014 signing order not required"
          }
        }
      },
      "SftpDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "sftpEnabled": {
            "type": "boolean",
            "description": "Indicates whether SFTP was enabled for this document.\n\n- `true` \u2014 SFTP was configured\n- `false` \u2014 SFTP was not configured"
          },
          "profileId": {
            "type": "string",
            "description": "SFTP Profile ID of the server where the completed document and audit trail will be sent. Returns `null` if SFTP is not configured."
          }
        }
      },
      "WorkflowDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Workflow ID through which the document was created."
          },
          "name": {
            "type": "string",
            "description": "Workflow name for the corresponding Workflow ID."
          },
          "type": {
            "type": "string",
            "description": "Workflow type.\n\n- `Pdf` \u2014 PDF-based workflow \n- `Template` - Template-based workflow"
          },
          "subtype": {
            "type": "string",
            "description": "Workflow sub-type.\n\n- `Single PDF` \u2014 No additional PDFs are appended to the template\n- `Multiple PDF` \u2014 Additional PDFs are appended to the template\n- `null` \u2014 Workflow not used to send this document"
          }
        }
      },
      "TemplateDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Template ID. Returns `null` if no template was used. This response may be sent in case of a deleted document, subject to availability."
          },
          "name": {
            "type": "string",
            "description": "Template name for the corresponding Template ID."
          }
        }
      },
      "AccountDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Account ID generated by Leegality. This response may be sent in case of a deleted document, subject to availability."
          },
          "name": {
            "type": "string",
            "description": "Organisation name configured."
          },
          "label": {
            "type": "string",
            "description": "Department name configured in the Leegality dashboard."
          },
          "brandName": {
            "type": "string",
            "description": "Brand name configured in the Leegality dashboard."
          }
        }
      },
      "SenderDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the user who sent/created the document."
          },
          "username": {
            "type": "string",
            "description": "Username (email or phone number) of the sender."
          }
        }
      },
      "StampDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "groupName": {
            "type": "string",
            "description": "Name of the stamp group from which the stamp paper was procured."
          },
          "groupNumber": {
            "type": "string",
            "description": "Number of the stamp group."
          },
          "stampValue": {
            "type": "string",
            "description": "Total Stamp value (denomination) attached to this document, as a numeric string."
          },
          "maximumValuePermitted": {
            "type": "string",
            "description": "Maximum stamp value permitted for this stamp group, as a numeric string."
          },
          "state": {
            "type": "string",
            "description": "Indian state associated with the stamp group (e.g., Delhi, Maharashtra, Karnataka)."
          },
          "stamps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StampArray3_1ResponseObject"
            }
          },
          "multipleStampSeriesUsed": {
            "type": "boolean",
            "description": "Indicates whether multiple stamp series were used for this document.\n\n`true` if multiple series were used, `false` otherwise."
          }
        }
      },
      "SeriesList3_1ApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "seriesList": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SeriesArray3_1ResponseObject"
                }
              }
            }
          }
        }
      },
      "SeriesArray3_1ResponseObject": {
        "type": "object",
        "properties": {
          "seriesNumber": {
            "type": "string",
            "description": "Unique series number"
          },
          "state": {
            "type": "string",
            "description": "State to which the stamp papers belong."
          },
          "denomination": {
            "type": "integer",
            "description": "Denomination of stamp in the series."
          },
          "firstPartyName": {
            "type": "string",
            "description": "Name of first party."
          },
          "secondPartyName": {
            "type": "string",
            "description": "Name of second party."
          },
          "purpose": {
            "type": "string",
            "description": "Purpose of stamp."
          },
          "legend": {
            "type": "string",
            "description": "Legend to be printed on the physical stamp paper."
          },
          "underProcess": {
            "type": "integer",
            "description": "Number of stamps under process."
          },
          "blocked": {
            "type": "integer",
            "description": "Number of stamps blocked."
          },
          "reserved": {
            "type": "integer",
            "description": "Number of stamps reserved."
          },
          "unused": {
            "type": "integer",
            "description": "Number of stamps available for use."
          },
          "used": {
            "type": "integer",
            "description": "Number of stamps already used."
          },
          "expired": {
            "type": "integer",
            "description": "Number of stamps already expired."
          },
          "total": {
            "type": "integer",
            "description": "Total number of stamps."
          }
        }
      },
      "SeriesExpiry3_1ApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "seriesList": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SeriesExpiryArray3_1ResponseObject"
                }
              }
            }
          }
        }
      },
      "SeriesExpiryArray3_1ResponseObject": {
        "type": "object",
        "properties": {
          "seriesNumber": {
            "type": "string",
            "description": "Unique series number"
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry Date of the stamp papers."
          },
          "purchaseDate": {
            "type": "string",
            "description": "Purchase date of the stamp."
          },
          "quantity": {
            "type": "integer",
            "description": "Quantity of stamp in the series."
          }
        }
      },
      "NeslDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": "string",
            "description": "Transaction ID received during NESL transaction."
          },
          "responseCode": {
            "type": "string",
            "description": "Response Code sent by NeSL."
          },
          "responseMessage": {
            "type": "string",
            "description": "Response message for the code received."
          },
          "isRetryAllowed": {
            "type": "string",
            "description": "Indicates whether retry is allowed for this NeSL document.\n\n- `true` \u2014 retry is allowed; call the Retry NeSL API\n- `false` \u2014 retry is not allowed"
          },
          "loanDetails": {
            "$ref": "#/components/schemas/NeslLoanDetails3_1ResponseObject"
          },
          "securityDetails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NeslSecurityDetails3_1ResponseObject"
            }
          },
          "stampDetails": {
            "$ref": "#/components/schemas/NeslStampDetails3_1ResponseObject"
          },
          "partyDetails": {
            "$ref": "#/components/schemas/NeslPartyDetails3_1ResponseObject"
          },
          "neslEstampStatus": {
            "type": "string",
            "description": "- `SUCCESS` \u2014 Stamping is completed at NeSL\n- `PENDING` \u2014 Stamping is not yet completed at NeSL"
          },
          "neslEstampCertificates": {
            "type": "array",
            "description": "A list of the Stamp ID(s) that have been stamped by NeSL.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CoordinatePickerDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "coordinatePickerUrl": {
            "type": "string",
            "description": "URL for the coordinate picker to set eSign coordinates on the document."
          },
          "coordinatePickerWebhook": {
            "type": "string",
            "description": "Webhook URL on which a response is sent when eSign coordinates are set by the coordinate picker."
          }
        }
      },
      "NeslLoanDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "loanNumber": {
            "type": "string",
            "description": "The loan number associated with the debt."
          },
          "sanctionNumber": {
            "type": "string",
            "description": "The sanction number associated with the debt."
          },
          "registrationType": {
            "type": "string",
            "description": "Type of debt (Individual Loan or Non-Individual Loan)."
          },
          "state": {
            "type": "string",
            "description": "The state in which stamp duty is being paid."
          },
          "branchName": {
            "type": "string",
            "description": "The name of the branch granting the loan."
          },
          "branchAddress": {
            "type": "string",
            "description": "The address of the branch granting the loan."
          },
          "dateOfSanction": {
            "type": "string",
            "description": "The date on which the loan was sanctioned as per the lender's CBS."
          },
          "emiAmount": {
            "type": "string",
            "description": "Interest installment amount payable on the loan."
          },
          "rateOfInterest": {
            "type": "string",
            "description": "Rate of Interest on the loan."
          },
          "sanctionAmount": {
            "type": "string",
            "description": "The amount sanctioned by the financial creditor."
          },
          "tenure": {
            "type": "string",
            "description": "The tenure of the loan."
          },
          "typeOfDebt": {
            "type": "string",
            "description": "The type of loan (financial debt or operational debt)."
          },
          "accountClosedFlag": {
            "type": "string",
            "description": "Whether the account is closed (yes, no, or assigned debt)."
          },
          "fundType": {
            "type": "string",
            "description": "Whether the credit facility is funded or non funded."
          },
          "sanctionCurrency": {
            "type": "string",
            "description": "The currency in which the loan is denominated (INR or USD)."
          },
          "creditSubtype": {
            "type": "string",
            "description": "Whether the financial debt is created pursuant to a credit facility or the purchase of a property."
          },
          "facilityName": {
            "type": "string",
            "description": "The name of the loan facility."
          },
          "amountOverdue": {
            "type": "string",
            "description": "The amount overdue on the loan."
          },
          "otherChargeAmount": {
            "type": "string",
            "description": "Any other charges (if applicable)."
          },
          "debtStartDate": {
            "type": "string",
            "description": "The date on which the financial debt started."
          },
          "interestAmount": {
            "type": "string",
            "description": "The amount of interest."
          },
          "oldDebtRefNo": {
            "type": "string",
            "description": "The old debt reference number (applicable in case there is a change in the debt reference number)."
          },
          "principalOutstanding": {
            "type": "string",
            "description": "The outstanding principal amount."
          },
          "loanRemark": {
            "type": "string",
            "description": "Loan remarks (if any)."
          },
          "totalOutstandingAmount": {
            "type": "string",
            "description": "Total outstanding amount."
          },
          "creditorBusinessUnit": {
            "type": "string",
            "description": "The business unit of the creditor providing the debt (such as SME, Retail etc)."
          },
          "drawingPower": {
            "type": "string",
            "description": "The drawing power of the loan."
          },
          "daysPastDue": {
            "type": "string",
            "description": "The number of days past due date."
          },
          "event": {
            "type": "string",
            "description": "The type of eBG event.\n\n**Note:** Valid values for eBG document creation: `INVOCATION`, `AMENDMENT`, `CANCELLATION`, `RENEWAL`, `CLOSURE`, `PARTIAL_INVOCATION`. `EXTEND_OR_PAY` is not valid for document creation but may be received as a notification event type.",
            "enum": [
              "INVOCATION",
              "AMENDMENT",
              "CANCELLATION",
              "RENEWAL",
              "CLOSURE",
              "PARTIAL_INVOCATION"
            ]
          },
          "expiryDate": {
            "type": "string",
            "description": "The expiry date of eBG"
          },
          "claimExpiryDate": {
            "type": "string",
            "description": "The claim expiry date of eBG"
          },
          "currencyOfDebt": {
            "type": "string",
            "description": "The currency of the debt"
          }
        }
      },
      "NeslPartyDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string",
            "description": "Full name of the Party."
          },
          "contactPersonName": {
            "type": "string",
            "description": "Full name of the contact person of the Party."
          },
          "contactRelation": {
            "type": "string",
            "description": "Relation of the party to the debt (Debtor, Guarantor, Co-obligant)."
          },
          "emailId": {
            "type": "string",
            "description": "Email ID of the signer."
          },
          "mobileNumber": {
            "type": "string",
            "description": "Mobile Number of the signer."
          },
          "dob": {
            "type": "string",
            "description": "Date of Birth/Incorporation."
          },
          "legalConstitution": {
            "type": "string",
            "description": "Legal constitution of the signer (Resident Individual, Private Limited, Public Limited, LLP, Proprietorship, Partnership, Entity created by Statute, Trust, HUF, Coop Society, Association of Persons, Government, Self Help Groups, Non-Resident, Foreign Company)."
          },
          "alternateEmailId": {
            "type": "string",
            "description": "Alternate email ID of the signer."
          },
          "alternateMobileNumber": {
            "type": "string",
            "description": "Alternate mobile of the signer."
          },
          "officialDocType": {
            "type": "string",
            "description": "Official Document Type (Pan Card, Driving License, Voter ID, Passport, Others)."
          },
          "officialDocId": {
            "type": "string",
            "description": "Official Document ID."
          },
          "registeredAddress": {
            "type": "string",
            "description": "Registered address of the signer."
          },
          "registeredPinCode": {
            "type": "string",
            "description": "PIN code of the registered address of the signer."
          },
          "designation": {
            "type": "string",
            "description": "Designation of the signer (relevant in case of corporate entities)."
          },
          "communicationAddress": {
            "type": "string",
            "description": "Communication address of the signer."
          },
          "communicationAddressPinCode": {
            "type": "string",
            "description": "PIN code of the communication address of the signer."
          },
          "cin": {
            "type": "string",
            "description": "Corporate Identification Number (relevant in case of corporate entities)."
          },
          "kin": {
            "type": "string",
            "description": "KYC Identification Number of signer."
          },
          "partyType": {
            "type": "string",
            "description": "Type of Party (Indian entity/ Resident Individual/ Foreign Entity/ NRI/Foreign Individual."
          },
          "isIndividual": {
            "type": "string",
            "description": "If the party is individual or not.\n\n**Note:** Valid values are `YES` or `NO` (case-insensitive, full words).",
            "enum": [
              "YES",
              "NO"
            ]
          },
          "signatoryGender": {
            "type": "string",
            "description": "Gender of the signatory"
          },
          "businessUnit": {
            "type": "string",
            "description": "Business Unit"
          }
        }
      },
      "NeslSecurityDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "securityDescription": {
            "type": "string",
            "description": "Description of security."
          },
          "assetsType": {
            "type": "string",
            "description": "Type of asset forming security (Movable, Immovable, Intangible, Not Classified)."
          },
          "chargeType": {
            "type": "string",
            "description": "Type of charge created (Mortgage, Hypothecation, Charge, Assignment, Pledge, Lien, Negative Lien, Guarantee, Others, Not Classified)."
          },
          "assetId": {
            "type": "string",
            "description": "Asset ID of the Security (used internally by the lender)."
          },
          "doc": {
            "type": "string",
            "description": "Date of creation of security."
          },
          "dov": {
            "type": "string",
            "description": "Date of valuation of security."
          },
          "cersaiId": {
            "type": "string",
            "description": "CERSAI ID of security created."
          },
          "rocChargeId": {
            "type": "string",
            "description": "ROC ID for security created."
          },
          "securityValue": {
            "type": "string",
            "description": "Value of security."
          }
        }
      },
      "NeslStampDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "firstParty": {
            "type": "string",
            "description": "The name of the first party (for the stamp paper)."
          },
          "secondParty": {
            "type": "string",
            "description": "The name of the second party (for the stamp paper)."
          },
          "stampDutyAmount": {
            "type": "string",
            "description": "The stamp duty amount."
          },
          "considerationPrice": {
            "type": "string",
            "description": "The consideration price for the purposes of stamp duty."
          },
          "descriptionOfDocument": {
            "type": "string",
            "description": "The description of the document for the purposes of stamp duty."
          },
          "stampDutyPaidBy": {
            "type": "string",
            "description": "The name of the party paying the stamp duty.\n\n**Note:** The value must exactly match the name provided in either the `firstParty` or `secondParty` field of this stampData entry."
          },
          "articleCode": {
            "type": "string",
            "description": "Article code for payment of stamp duty.\n\n**Note:** Accepted values appear to be integer strings (e.g., `\"1\"`, `\"2\"`, `\"3\"`, `\"4\"`, `\"6\"`)."
          },
          "firstPartyPin": {
            "type": "string",
            "description": "The pin of the first party (for the stamp paper)."
          },
          "secondPartyPin": {
            "type": "string",
            "description": "The pin of the second party (for the stamp paper)."
          },
          "firstPartyOVDType": {
            "type": "string",
            "description": "The OVD Type of the first party (for the stamp paper)."
          },
          "firstPartyOVDValue": {
            "type": "string",
            "description": "The OVD Value of the first party (for the stamp paper)."
          },
          "secondPartyOVDType": {
            "type": "string",
            "description": "The OVD Type of the second party (for the stamp paper)."
          },
          "secondPartyOVDValue": {
            "type": "string",
            "description": "The OVD Value of the second party (for the stamp paper)."
          }
        }
      },
      "InvitationsArray3_1ResponseObject": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the invitee (signer/reviewer)."
          },
          "email": {
            "type": "string",
            "description": "Email address of the invitee."
          },
          "phone": {
            "type": "string",
            "description": "Phone number of the invitee (10-digit format without country code)."
          },
          "inviteeType": {
            "type": "string",
            "description": "Type of the invitee.\n\n- `APPROVER` \u2014 A reviewer who reviews and approves the document before signers can proceed\n- `SIGNER` \u2014 A signer who applies a signature to the document"
          },
          "inviteeConfigs": {
            "$ref": "#/components/schemas/InviteeConfigDetails3_1ResponseObject"
          },
          "recordReviewerDetails": {
            "type": "boolean",
            "description": "Indicates whether the reviewer's details are captured in the audit trail. Applicable only for reviewer invitee type."
          },
          "inviteeGroup": {
            "$ref": "#/components/schemas/InviteeGroupDetails3_1ResponseObject"
          },
          "invitationUrl": {
            "type": "string",
            "description": "Signing/reviewing URL generated for this invitee. The invitee uses this URL to access and sign/review the document."
          },
          "allowedSignatures": {
            "type": "array",
            "description": "List of signature types allowed for this invitee.\n\n- **Possible values:** `Virtual Sign`, `Visual Sign`, `Quick Sign`, `Aadhaar eSign`, `DSC Token`, `NeSL`, `Doc Signer`",
            "items": {
              "type": "string"
            }
          },
          "usedSignatureType": {
            "type": "string",
            "description": "The signature type actually used by the invitee to sign. Returns `null` if the invitee has not yet signed.\n\n- **Possible values:** `Virtual Sign`, `Visual Sign`, `Quick Sign`, `Aadhaar eSign`, `DSC Token`, `Nesl_eSign`, `Doc Signer`"
          },
          "signatureSubOptionUsed": {
            "type": "string",
            "description": "The signature sub-type actually used by the invitee to sign. Returns `null` if the invitee has not yet signed. Possible values are\n\n- **NeSL eSign:** `OTP`, `BIO`, `FACE`, `IRIS`, `ETOKEN`"
          },
          "signatureOptions": {
            "$ref": "#/components/schemas/InviteeSignatureOptionDetails3_1ResponseObject"
          },
          "signatureOptionUsed": {
            "type": "string",
            "description": "The specific signature option (sub-type) used under the selected signature type. Returns `null` if not yet signed.\n\n- **Aadhaar eSign:** `One Time Password`, `Bio-Metric`, `Iris`, `Face`\n- **Virtual Sign:** `Allow Draw`, `Allow Choose`, `Affix Fingerprint`\n- **Visual Sign:** `Allow Draw`, `Allow Choose`, `Physical Signature`\n- **Quick Sign:** `Allow Draw`, `Allow Choose`, `Affix Fingerprint`, `Physical Signature`"
          },
          "neslInvitationDetails": {
            "$ref": "#/components/schemas/InviteeNESLParticipantDetails3_1ResponseObject"
          },
          "offlineSignDetails": {
            "$ref": "#/components/schemas/InviteeOfflineSignDetails3_1ResponseObject"
          },
          "invitationStatus": {
            "$ref": "#/components/schemas/InviteeStatusDetails3_1ResponseObject"
          },
          "certificateData": {
            "$ref": "#/components/schemas/InviteeCertificateDetails3_1ResponseObject"
          },
          "verificationRequest": {
            "$ref": "#/components/schemas/InviteeVerificationRequestDetails3_1ResponseObject"
          },
          "verificationResponse": {
            "type": "object",
            "description": "Verification results for this invitee. Returned only when the `invitations_verificationResponse` query parameter is set to `true`.\n\nContains the outcome of each configured verification check (name, pincode, state, title, YOB, gender) as well as face match and smart user liveliness results.",
            "properties": {
              "smartNamePercentage": {
                "type": "integer",
                "description": "Name matching percentage between the provided name and the name from the CA authority certificate.\n\n**Example:** `45` (means 45% match)\n\nReturns `null` if smart name verification is not configured."
              },
              "smartNameAI": {
                "type": "boolean",
                "description": "Whether Smart Name AI matching was enabled for this invitee.\n\n`true` = enabled, `false` = disabled, `null` = not configured."
              },
              "signatureVerification": {
                "type": "boolean",
                "description": "Whether signature certificate verification was enabled for this invitee.\n\n`true` = enabled, `false` = disabled, `null` = not configured."
              },
              "nameVerification": {
                "type": "boolean",
                "description": "Result of name verification against the signer's certificate.\n\n`true` = verification passed, `false` = verification failed, `null` = not configured."
              },
              "pincodeVerification": {
                "type": "boolean",
                "description": "Result of pincode verification against the signer's certificate.\n\n`true` = verification passed, `false` = verification failed, `null` = not configured."
              },
              "stateVerification": {
                "type": "boolean",
                "description": "Result of state verification against the signer's certificate.\n\n`true` = verification passed, `false` = verification failed, `null` = not configured."
              },
              "titleVerification": {
                "type": "boolean",
                "description": "Result of title (last 4 digits of Aadhaar) verification against the signer's certificate.\n\n`true` = verification passed, `false` = verification failed, `null` = not configured."
              },
              "yobVerification": {
                "type": "boolean",
                "description": "Result of year of birth verification against the signer's certificate.\n\n`true` = verification passed, `false` = verification failed, `null` = not configured."
              },
              "genderVerification": {
                "type": "boolean",
                "description": "Result of gender verification against the signer's certificate.\n\n`true` = verification passed, `false` = verification failed, `null` = not configured."
              },
              "neslNameVerification": {
                "type": "boolean",
                "description": "Indicates whether the invitee's name has been successfully verified. true means the verification succeeded, and false means it failed."
              },
              "neslNameVerificationPercentage": {
                "type": "integer",
                "description": "The percentage of accuracy achieved during the invitee's name verification."
              },
              "neslGenderVerification": {
                "type": "boolean",
                "description": "Indicates whether the invitee's gender has been successfully verified. true means the verification succeeded, and false means it failed."
              },
              "neslYobVerification": {
                "type": "boolean",
                "description": "Indicates whether the invitee's Year of Birth (YOB) has been successfully verified. true means the verification succeeded, and false means it failed."
              },
              "faceMatch": {
                "$ref": "#/components/schemas/FaceMatchArrayResponseObject"
              },
              "smartUserLiveliness": {
                "$ref": "#/components/schemas/SmartUserLivelinessArrayResponseObject"
              }
            }
          },
          "supportingDocuments": {
            "type": "array",
            "description": "Supporting documents uploaded by the invitee during the signing journey.\n\n> **Note:** The response field name is `attachments` (not `supportingDocuments`).",
            "items": {
              "$ref": "#/components/schemas/AttachmentsArrayResponseObject"
            }
          }
        }
      },
      "InviteeConfigDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "emailNotification": {
            "type": "boolean",
            "description": "Indicates whether email notifications are enabled for this invitee."
          },
          "phoneNotification": {
            "type": "boolean",
            "description": "Indicates whether phone/SMS notifications are enabled for this invitee."
          },
          "whatsappEnabled": {
            "type": "boolean",
            "description": "Indicates whether WhatsApp notifications for completion are enabled for this invitee."
          },
          "whatsAppNotification": {
            "type": "boolean",
            "description": "Indicates whether WhatsApp notifications for eSigning invitation, reminders, and all others are enabled. Only applicable if `whatsappEnabled` is `true`."
          },
          "retry": {
            "type": "integer",
            "description": "Number of retry attempts configured for this invitee (applicable only for Aadhaar eSign). This is the number of additional attempts allowed after the first attempt."
          },
          "fixedName": {
            "type": "boolean",
            "description": "If `true`, the invitee will NOT be able to edit their name in the signing journey. If `false`, the invitee can edit their name."
          },
          "noName": {
            "type": "boolean",
            "description": "If `true`, the invitee's name will not appear in the signature appearance."
          },
          "supportingDocument": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of supporting document names requested from the invitee during the signing journey."
          },
          "viewSupportingDocument": {
            "type": "boolean",
            "description": "If `true`, the invitee can view the supporting documents uploaded by all other invitees in the signing journey."
          },
          "organizationConfig": {
            "$ref": "#/components/schemas/InviteeOrganisationConfigDetails3_1ArrayResponseObject"
          },
          "security": {
            "$ref": "#/components/schemas/InviteeSecurityDetails3_1ArrayResponseObject"
          },
          "eSignPriority": {
            "$ref": "#/components/schemas/InviteeESignPriorityDetails3_1ArrayResponseObject"
          },
          "customURL": {
            "$ref": "#/components/schemas/InviteeCustomURLDetails3_1ArrayResponseObject"
          },
          "customConsent": {
            "type": "string",
            "description": "Custom consent content displayed to the invitee during the signing journey. Returns `null` if no custom consent is configured."
          },
          "enableRejectDocument": {
            "type": "boolean",
            "description": "If `true`, the signer is allowed to reject this invitation in the signing journey."
          },
          "enableRejectMessage": {
            "type": "boolean",
            "description": "If `true`, the signer is required to provide a message when rejecting the invitation."
          },
          "maskContactDetails": {
            "type": "boolean",
            "description": "If `true`, the invitee is restricted from viewing the contact details of other invitees during and after the signing journey. If `false`, the invitee can view other invitees' contact details."
          },
          "languageDetails": {
            "type": "object",
            "description": "Language configuration for the invitee's signing journey.",
            "properties": {
              "enableLanguage": {
                "type": "boolean",
                "description": "Whether language selection is enabled for this invitee. Returns `null` if not configured."
              },
              "defaultLanguage": {
                "type": "boolean",
                "description": "Whether a default language has been set. Returns `null` if not configured."
              },
              "defaultLanguageSelect": {
                "type": "string",
                "description": "The default language configured for this invitee's signing journey.\n\n- **Example values:** `HINDI`, `MARATHI`, `TAMIL`"
              }
            }
          },
          "paymentDetails": {
            "$ref": "#/components/schemas/InviteePaymentDetails"
          }
        }
      },
      "InviteeOrganisationConfigDetails3_1ArrayResponseObject": {
        "type": "object",
        "properties": {
          "nameRequired": {
            "type": "boolean",
            "description": "Indicates whether an organization name is required. The organization name appears on the rubber seal and signature appearance."
          },
          "fixedName": {
            "type": "boolean",
            "description": "If `true`, the invitee cannot edit the organization name that was pre-set. If `false`, the invitee can modify it."
          },
          "name": {
            "type": "string",
            "description": "Organization name. If `fixedName` is `false`, this is the name the invitee entered during the signing journey."
          },
          "requireSeal": {
            "type": "boolean",
            "description": "Indicates whether a rubber seal is required for this invitee."
          },
          "sealType": {
            "type": "string",
            "description": "Type of rubber seal configured for this invitee.\n\n- **Possible values:** `Authorized signatory seal`, `Director Seal`, `Custom Seal`"
          }
        }
      },
      "InviteeSecurityDetails3_1ArrayResponseObject": {
        "type": "object",
        "properties": {
          "enforceAuthentication": {
            "type": "boolean",
            "description": "Indicates whether OTP verification is required before the invitee can access the document."
          },
          "twoFactorAuthentication": {
            "type": "boolean",
            "description": "Indicates whether two-factor authentication (both Email and Phone OTP) is enabled for this invitee."
          },
          "sendDocumentRawUrl": {
            "type": "boolean",
            "description": "Indicates whether the raw document PDF URL is sent along with OTP emails/SMS messages."
          },
          "captureLocation": {
            "type": "boolean",
            "description": "Indicates whether geolocation capture is enabled during the signing journey."
          },
          "capturePhoto": {
            "type": "boolean",
            "description": "Indicates whether face/photo capture is enabled during the signing journey."
          },
          "gpsConfig": {
            "$ref": "#/components/schemas/gpsConfigResponse"
          },
          "faceMatch": {
            "$ref": "#/components/schemas/faceMatch"
          },
          "userLiveliness": {
            "type": "boolean",
            "description": "Indicates whether User Liveliness (Live OTP verification) is enabled."
          },
          "smartUserLiveliness": {
            "$ref": "#/components/schemas/smartUserLiveliness"
          }
        }
      },
      "InviteeESignPriorityDetails3_1ArrayResponseObject": {
        "type": "object",
        "properties": {
          "eSignPriorityEnabled": {
            "type": "boolean",
            "description": "Priority sequence is enabled for eSign types like Aadhaar"
          },
          "eSignPriorityConfig": {
            "type": "array",
            "description": "Configurations like retry attempt and order for eSign types (e.g., AADHAAR) and subtypes (e.g., OTP, BIO, IRIS)",
            "items": {
              "$ref": "#/components/schemas/InviteeESignPriorityESignPriorityConfig3_1ArrayResponseObject"
            }
          }
        }
      },
      "InviteeESignPriorityESignPriorityConfig3_1ArrayResponseObject": {
        "type": "object",
        "properties": {
          "signatureType": {
            "type": "string",
            "description": "Type eSign selected for the invitee like AADHAAR"
          },
          "eSignSubType": {
            "type": "string",
            "description": "Subtype of eSign selected for the invitee.\n\n- **Possible values:** `OTP`, `BIO`, `IRIS`, `FACE`"
          },
          "retryAttempts": {
            "type": "integer",
            "description": "Number of retry attempts assigned to this eSign subtype before the nextin order eSign subtype is shown to the signer"
          },
          "eSignOrder": {
            "type": "integer",
            "description": "The sequence in which this eSign subtype will appear in the signing journey"
          }
        }
      },
      "InviteeCustomURLDetails3_1ArrayResponseObject": {
        "type": "object",
        "properties": {
          "webhookURL": {
            "type": "string",
            "description": "The configured webhook URL for this invitee. Leegality sends a POST request to this URL after the invitee successfully signs.\n\nReturns `null` if no webhook URL is configured."
          },
          "redirectURL": {
            "type": "string",
            "description": "URL where you want the user to be redirected on completion of the transaction (Not applicable if you are using our Front-end SDKs). documentId will be appended to the URL on redirection."
          },
          "errorWebhookURL": {
            "type": "string",
            "description": "The configured error webhook URL for this invitee. Leegality sends a POST request to this URL after expiry, failure, or rejection of the signature.\n\nReturns `null` if no error webhook URL is configured for this invitee."
          },
          "baseURL": {
            "type": "string",
            "description": "URL where you want the user to be redirected on rejection/failure of the transaction (Not applicable if you are using our Front-end SDKs). documentId will be appended to the URL on redirection."
          },
          "webhookVersion": {
            "type": "string",
            "description": "The webhook version configured for this invitee, which determines the webhook payload format.\n\n- **Possible values:** `V2.1` (default), `V2.5`"
          }
        }
      },
      "InviteePaymentDetails": {
        "type": "object",
        "properties": {
          "paymentCollectionEnabled": {
            "type": "boolean",
            "description": "Indicates whether payment collection is enabled for this invitee. `true` if enabled, `false` if not."
          },
          "paymentProfileId": {
            "type": "string",
            "description": "Profile ID of the selected payment profile. Refer to the Account Tab in the Leegality dashboard to see details of the payment profile."
          },
          "paymentCollectionAmount": {
            "type": "string",
            "description": "The configured payment amount to be collected from the invitee, as a string."
          },
          "paymentCollectionMessage": {
            "type": "string",
            "description": "Message displayed to the invitee during payment collection. Returns `null` if no message was configured."
          },
          "paymentCollectStatus": {
            "type": "string",
            "description": "Current status of payment collection for this invitee.\n\n- **Razorpay:** `notPaid`, `Authorised`, `Captured`, `Refunded`\n- **Billdesk:** `notPaid`, `Completed`, `Refunded`"
          },
          "paymentId": {
            "type": "string",
            "description": "Payment transaction ID. Available when `paymentCollectStatus` is `Authorised` or `Captured` (Razorpay), or `Completed` (Billdesk). Returns `null` otherwise."
          },
          "paymentEventDate": {
            "type": "string",
            "description": "Payment transaction date. Available when `paymentCollectStatus` is `Authorised` or `Captured` (Razorpay), or `Completed` (Billdesk). Returns `null` otherwise."
          }
        }
      },
      "InviteeGroupDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the invitee group."
          },
          "name": {
            "type": "string",
            "description": "Name of the invitee group."
          },
          "completionThreshold": {
            "type": "integer",
            "description": "Number of people required to sign in the group for the group signature to be considered complete.\n\nFor example, if a group has 5 members and the threshold is 3, only 3 out of 5 need to sign.\n\nReturns `null` for invitees not in a group."
          },
          "completionStatus": {
            "type": "string",
            "description": "Completion status of the group signing process as a fraction string.\n\n- **Format:** `\"signed/total\"` (e.g., `\"1/2\"` means 1 out of 2 members have signed)"
          },
          "size": {
            "type": "integer",
            "description": "Total number of invitations/members in the group."
          },
          "completed": {
            "type": "boolean",
            "description": "Indicates whether the group signature requirement has been met (i.e., the number of signers has reached the `completionThreshold`)."
          }
        }
      },
      "InviteeSignatureOptionDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "aadhaar": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Aadhaar authentication method(s) configured for this invitee.\n\n- **Possible values:** `OTP`, `BIO`, `IRIS`, `FACE`"
          },
          "virtual": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Virtual sign type(s) configured for this invitee.\n\n- **Possible values:** `Allow Choose`, `Allow Draw`, `Affix Fingerprint`"
          },
          "visualSign": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Visual Sign type(s) configured for this invitee.\n\nOnly present when `invitations_signatureOptions_visualSign` is passed as `true`.\n\n- **Possible values:** `Allow Choose`, `Allow Draw`, `Physical Signature`"
          },
          "quickSign": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Quick Sign option(s) configured for this invitee.\n\nOnly present when `invitations_signatureOptions_quickSign` is passed as `true`.\n\n- **Possible values:** `Allow Choose`, `Allow Draw`, `Affix Fingerprint`, `Physical Signature`"
          }
        }
      },
      "InviteeNESLParticipantDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "NeSL participant type.\n\n- `F2F` \u2014 invitee receives sign URL from Leegality via mail/SMS\n- `Non F2F` \u2014 sign URL is sent directly by NeSL"
          },
          "participantDetails": {
            "$ref": "#/components/schemas/NeslparticipantDetails3_1ResponseObject"
          }
        }
      },
      "NeslparticipantDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string",
            "description": "Full name of the Party."
          },
          "contactPersonName": {
            "type": "string",
            "description": "Full name of the contact person of the Party."
          },
          "contactRelation": {
            "type": "string",
            "description": "Relation of the party to the debt (Debtor, Guarantor, Co-obligant).\n\n**Note:** For EBG, only `DEBTOR` (first participant) and `BENEFICIARY` are accepted."
          },
          "emailId": {
            "type": "string",
            "description": "Email ID of the signer."
          },
          "mobileNumber": {
            "type": "string",
            "description": "Mobile Number of the signer."
          },
          "dob": {
            "type": "string",
            "description": "Date of Birth/Incorporation."
          },
          "legalConstitution": {
            "type": "string",
            "description": "Legal constitution of the signer (Resident Individual, Private Limited, Public Limited, LLP, Proprietorship, Partnership, Entity created by Statute, Trust, HUF, Coop Society, Association of Persons, Government, Self Help Groups, Non-Resident, Foreign Company)."
          },
          "alternateEmailId": {
            "type": "string",
            "description": "Alternate email ID of the signer."
          },
          "alternateMobileNumber": {
            "type": "string",
            "description": "Alternate mobile of the signer."
          },
          "officialDocType": {
            "type": "string",
            "description": "Official Document Type (Pan Card, Driving License, Voter ID, Passport, Others)."
          },
          "officialDocId": {
            "type": "string",
            "description": "Official Document ID."
          },
          "registeredAddress": {
            "type": "string",
            "description": "Registered address of the signer."
          },
          "registeredPinCode": {
            "type": "string",
            "description": "PIN code of the registered address of the signer."
          },
          "designation": {
            "type": "string",
            "description": "Designation of the signer (relevant in case of corporate entities)."
          },
          "communicationAddress": {
            "type": "string",
            "description": "Communication address of the signer."
          },
          "communicationAddressPinCode": {
            "type": "string",
            "description": "PIN code of the communication address of the signer."
          },
          "cin": {
            "type": "string",
            "description": "Corporate Identification Number (relevant in case of corporate entities)."
          },
          "kin": {
            "type": "string",
            "description": "KYC Identification Number of signer."
          },
          "partyType": {
            "type": "string",
            "description": "Type of Party (Indian entity/ Resident Individual/ Foreign Entity/ NRI/Foreign Individual."
          },
          "isIndividual": {
            "type": "string",
            "description": "If the participant is individual or not.\n\n**Note:** Valid values are `YES` or `NO` (case-insensitive, full words). Required for EBG registrationType.",
            "enum": [
              "YES",
              "NO"
            ]
          },
          "signatoryGender": {
            "type": "string",
            "description": "Gender of the signatory"
          },
          "businessUnit": {
            "type": "string",
            "description": "Business Unit"
          }
        }
      },
      "InviteeOfflineSignDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "fixSignerId": {
            "type": "boolean",
            "description": "Parameter to find out if signerID is fixed for the invitation."
          },
          "mobileNumber": {
            "type": "string",
            "description": "Mobile number corresponding to the signerID fixed for the invitation."
          },
          "pan": {
            "type": "string",
            "description": "PAN corresponding to the signerID fixed for the invitation."
          },
          "signerId": {
            "type": "string",
            "description": "SignerID corresponding to the signerID fixed for the invitation."
          }
        }
      },
      "InviteeStatusDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "description": "Indicates it is the invitee's turn to act (sign/review).\n\n- `true` \u2014 invitee can currently access and act on the document\n- `false` \u2014 not the invitee's turn yet\n\nWhen signing order is enabled, only the current invitee(s) in the sequence will have `active=true`.\n\n> **Note:** `active` remains `true` even after the invitee has signed/approved."
          },
          "signed": {
            "type": "boolean",
            "description": "Indicates the invitation has been signed successfully by the invitee."
          },
          "reviewed": {
            "type": "boolean",
            "description": "Applicable only for Reviewer invitee type. Indicates the invitation has been reviewed (either approved or rejected)."
          },
          "approved": {
            "type": "boolean",
            "description": "Applicable only for Reviewer invitee type. Indicates the reviewer has approved the document."
          },
          "rejected": {
            "type": "boolean",
            "description": "Applicable only for Signer invitee type. Indicates the signer has rejected the invitation.\n\nResets to `false` if the invitation is re-sent and the signer subsequently signs."
          },
          "expired": {
            "type": "boolean",
            "description": "Indicates the invitation has expired. The invitee can no longer access the signing URL.\n\n**Note:** Also set to `true` when a group signing threshold is met and this invitee was a non-signing member of the group. In that case, `failureReason` will contain `\"Group Minimum Signature Completed.\"`."
          },
          "recordApproverResponse": {
            "type": "boolean",
            "description": "Indicates whether the reviewer/approver's actions are recorded in the audit trail."
          },
          "creationDate": {
            "type": "string",
            "description": "Creation date of the signing invitation.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry date of the signing invitation.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`\n\nIf `null`, the default expiry is 45 minutes from creation."
          },
          "signDate": {
            "type": "string",
            "description": "Date when the invitee signed the document. Returns `null` if not yet signed.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
          },
          "failureReason": {
            "type": "string",
            "description": "Reason for failure or special status. Not limited to error scenarios \u2014 also contains informational messages.\n\n- `\"Group Minimum Signature Completed.\"` \u2014 Group threshold was met; remaining group members' invitations closed\n- `\"Signed but Verification Failed.\"` \u2014 Invitee signed but certificate verification failed\n- `null` \u2014 No failure or special status"
          },
          "rejectionMessage": {
            "type": "string",
            "description": "The message sent by the approver/reviewer at the time of rejecting the invitation. Returns `null` if no rejection occurred or no message was provided."
          },
          "signRejectionMessage": {
            "type": "string",
            "description": "The message sent by the signer/invitee at the time of rejecting the invitation. Returns `null` if no rejection occurred or no message was provided.\n\n**Note:** This value persists even if the invitee later signs the document (after re-sending). The `rejected` field resets to `false` after signing, but this message remains."
          }
        }
      },
      "InviteeCertificateDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the signer as recorded in the digital signature certificate. Returns `null` if not available."
          },
          "yob": {
            "type": "string",
            "description": "Year of birth of the signer from the digital signature certificate.\n\n- **Format:** `YYYY` (e.g., `\"1998\"`)"
          },
          "gender": {
            "type": "string",
            "description": "Gender of the signer from the digital signature certificate.\n\n- `M` \u2014 Male\n- `F` \u2014 Female\n- `T` \u2014 Transgender"
          },
          "pincode": {
            "type": "string",
            "description": "PIN code of the signer from the digital signature certificate (6-digit string). Returns `null` if not available."
          },
          "title": {
            "type": "string",
            "description": "Last 4 digits of the Aadhaar number of the signer, as recorded in the digital signature certificate. Returns `null` if not available."
          },
          "state": {
            "type": "string",
            "description": "State of the signer from the digital signature certificate. Returns `null` if not available."
          },
          "photoHash": {
            "type": "string",
            "description": "SHA-256 hash of the signer's photo from the digital signature certificate.\n\n- **Format:** 64-character hexadecimal string"
          },
          "uid": {
            "type": "string",
            "description": "UID from the digital signature certificate.\n\n**Note:** This field is typically `null` (masked/not returned) even after Aadhaar-based signing, due to privacy restrictions."
          },
          "serialNumber": {
            "type": "string",
            "description": "Serial number of the digital signature certificate used for signing. Returns `null` if not available."
          }
        }
      },
      "InviteeVerificationRequestDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "aadhaarConfig": {
            "$ref": "#/components/schemas/InviteeAadhaarVerificationRequestDetails3_1ResponseObject"
          },
          "offlineConfig": {
            "$ref": "#/components/schemas/InviteeAadhaarVerificationRequestDetails3_1ResponseObject"
          },
          "dscConfig": {
            "$ref": "#/components/schemas/InviteeDSCVerificationRequestDetails3_1ResponseObject"
          },
          "neslConfig": {
            "$ref": "#/components/schemas/InviteeAadhaarVerificationRequestDetails3_1ResponseObject"
          }
        }
      },
      "InviteeAadhaarVerificationRequestDetails3_1ResponseObject": {
        "type": "object",
        "description": "Verification request configuration for this invitee. These fields contain the **input values** provided when creating the document \u2014 not boolean flags.\n\n**Note:** `smartNamePercentage` is a boolean toggle (`true`/`null`). All other fields contain the actual input values to verify against (e.g., pincode string, state name, year of birth integer).",
        "properties": {
          "smartNamePercentage": {
            "type": "boolean",
            "description": "Whether smart name percentage matching is enabled for this invitee.\n\nReturns `true` if enabled, `null` if not configured."
          },
          "nameVerification": {
            "type": "boolean",
            "description": "Whether exact name verification is enabled for this invitee.\n\nReturns `true` if enabled, `null` if not configured."
          },
          "pincodeVerification": {
            "type": "string",
            "description": "The pincode value to verify against the signer's certificate.\n\n**Example:** `\"247667\"`\n\nReturns `null` if pincode verification is not configured."
          },
          "stateVerification": {
            "type": "string",
            "description": "The state name to verify against the signer's certificate.\n\n**Example:** `\"Uttarakhand\"`\n\nReturns `null` if state verification is not configured."
          },
          "titleVerification": {
            "type": "string",
            "description": "The last 4 digits of the Aadhaar number to verify against the signer's certificate.\n\n**Example:** `\"3870\"`\n\nReturns `null` if title verification is not configured."
          },
          "yobVerification": {
            "type": "integer",
            "description": "The year of birth to verify against the signer's certificate.\n\n**Example:** `1998`\n\nReturns `null` if YOB verification is not configured."
          },
          "genderVerification": {
            "type": "string",
            "description": "The gender value to verify against the signer's certificate.\n\n- `M` \u2014 Male\n- `F` \u2014 Female\n- `T` \u2014 Transgender"
          }
        }
      },
      "InviteeDSCVerificationRequestDetails3_1ResponseObject": {
        "type": "object",
        "properties": {
          "smartNamePercentage": {
            "type": "boolean",
            "description": "Whether smart name verification is turned on or not."
          },
          "nameVerification": {
            "type": "boolean",
            "description": "Whether name verification is turned on or not."
          },
          "pincodeVerification": {
            "type": "boolean",
            "description": "Whether pincode verification is turned on or not."
          },
          "stateVerification": {
            "type": "boolean",
            "description": "Whether state verification is turned on or not."
          }
        }
      },
      "StampArray3_1ResponseObject": {
        "type": "object",
        "description": "Array of stamps containing details of each stamp attached to the document.",
        "properties": {
          "series": {
            "type": "string",
            "description": "Stamp series number",
            "example": "03"
          },
          "amount": {
            "type": "string",
            "description": "Denomination/value of the stamp paper attached to the document.\n\n- **Format:** Numeric string (e.g., `\"53.0\"`)"
          },
          "serialNumber": {
            "type": "string",
            "description": "Serial number affixed on the stamp paper by the issuing authority."
          },
          "associatedDocumentId": {
            "type": "string",
            "description": "Document ID physically printed on the stamp paper. This links the stamp paper to the document."
          }
        }
      },
      "FolderArrayResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique Folder ID. Returns `null` if the document is not saved in any folder."
          },
          "name": {
            "type": "string",
            "description": "Folder name. Returns `null` if the document is not saved in any folder."
          }
        }
      },
      "CCArrayResponseObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for this CC recipient."
          },
          "name": {
            "type": "string",
            "description": "Name of the CC recipient."
          },
          "email": {
            "type": "string",
            "description": "Email address of the CC recipient."
          },
          "invitationNotification": {
            "type": "boolean",
            "description": "Indicates whether invitation notifications are enabled for this CC."
          },
          "signingNotification": {
            "type": "boolean",
            "description": "Indicates whether signing notifications (sent when a signer signs) are enabled for this CC."
          },
          "completionNotification": {
            "type": "boolean",
            "description": "Indicates whether completion notifications (sent when all signers have signed) are enabled for this CC."
          },
          "failureNotification": {
            "type": "boolean",
            "description": "Indicates whether failure notifications are enabled for this CC."
          },
          "sendInvitationUrl": {
            "type": "boolean",
            "description": "Indicates whether the signing invitation URL is shared with this CC."
          },
          "shareDocAuditTrail": {
            "type": "boolean",
            "description": "Indicates whether the audit trail are shared with this CC."
          },
          "enforceOneFactorAuthentication": {
            "type": "boolean",
            "description": "Indicates whether one-factor authentication (OTP) is required for this CC to access the document."
          },
          "recordAuditTrail": {
            "type": "boolean",
            "description": "Indicates whether this CC's notification events are recorded in the audit trail."
          }
        }
      },
      "StampArrayResponseObject": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "description": "Indian state associated with the stamp paper."
          },
          "amount": {
            "type": "string",
            "description": "Denomination value of the stamp paper."
          },
          "serialNumber": {
            "type": "string",
            "description": "Serial number of the stamp paper."
          }
        }
      },
      "ActivationApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "AttachmentsArrayResponseObject": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "description": "CDN download URL for the attachment file.\n\nThis is a signed URL with an expiration time \u2014 not a base64-encoded string."
          },
          "name": {
            "type": "string",
            "description": "Filename of the attachment.\n\n**Example:** `\"Invoice-6814F2DA-0024.pdf\"`"
          },
          "type": {
            "type": "string",
            "description": "MIME type of the attachment.\n\n**Possible values:** `application/pdf`, `image/png`, `image/jpg`, `image/jpeg`"
          }
        }
      },
      "InvitationsArrayResponseObject": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Full name of the signer."
          },
          "email": {
            "type": "string",
            "description": "Email address of the signer."
          },
          "phone": {
            "type": "string",
            "description": "Phone number of the signer."
          },
          "signUrl": {
            "type": "string",
            "description": "Unique signing URL generated by Leegality for this signer."
          },
          "active": {
            "type": "boolean",
            "description": "Indicates whether it is this invitee's turn to sign.\n\n**Possible values:** `true`, `false`"
          },
          "signed": {
            "type": "boolean",
            "description": "Indicates whether this invitation has been signed.\n\n**Possible values:** `true`, `false`"
          },
          "rejected": {
            "type": "boolean",
            "description": "Indicates whether this invitation has been rejected by the signer.\n\n**Possible values:** `true`, `false`"
          },
          "expired": {
            "type": "boolean",
            "description": "Indicates whether this invitation has expired.\n\n**Possible values:** `true`, `false`"
          },
          "creationDate": {
            "type": "string",
            "description": "Creation date of the signing invitation.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry date of the signing invitation.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`\n\n> **Note:** If `expiryDate` is `null`, expiry is set to 45 minutes from creation."
          },
          "signDate": {
            "type": "string",
            "description": "Date when the invitation was signed. Returns `null` if not yet signed.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
          },
          "signType": {
            "type": "string",
            "description": "The backend signature type code. Present only after the invitee has signed.\n\n**Possible values:** `AADHAAR`, `VIRTUAL_SIGN`, `VISUAL_SIGN`, `QUICK_SIGN`, `DSC`, `NESL_ESIGN`, `OFFLINE_SIGN`, `DOC_SIGNER`, `AUTOMATED_SIGN`\n\n**Note:** `OFFLINE_SIGN` refers to Cloud DSC. This field uses backend enum names (e.g., `QUICK_SIGN`) while the GET API's `usedSignatureType` returns human-readable names (e.g., `Quick Sign`)."
          },
          "failureReason": {
            "type": "string",
            "description": "Reason for failure of this signing invitation. Returned only when enabled via the `failureReason` request parameter."
          },
          "verificationResponse": {
            "type": "object",
            "description": "Verification data for this invitee. Returned only when enabled via the `verificationResponse` request parameter.",
            "properties": {
              "smartNamePercentage": {
                "type": "integer",
                "description": "Integer percentage of name match between the provided name and the CA authority certificate response."
              },
              "signatureVerification": {
                "type": "boolean",
                "description": "Result of signature verification. Returns `true` if passed, `false` if failed, `null` if not configured."
              },
              "nameVerification": {
                "type": "boolean",
                "description": "Result of name verification. Returns `true` if passed, `false` if failed, `null` if not configured."
              },
              "pincodeVerification": {
                "type": "boolean",
                "description": "Result of pincode verification. Returns `true` if passed, `false` if failed, `null` if not configured."
              },
              "stateVerification": {
                "type": "boolean",
                "description": "Result of state verification. Returns `true` if passed, `false` if failed, `null` if not configured."
              },
              "titleVerification": {
                "type": "boolean",
                "description": "Result of title verification. Returns `true` if passed, `false` if failed, `null` if not configured."
              },
              "yobVerification": {
                "type": "boolean",
                "description": "Result of year of birth verification. Returns `true` if passed, `false` if failed, `null` if not configured."
              },
              "genderVerification": {
                "type": "boolean",
                "description": "Result of gender verification. Returns `true` if passed, `false` if failed, `null` if not configured."
              },
              "faceMatch": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FaceMatchArrayResponseObject"
                }
              }
            }
          },
          "attachments": {
            "type": "array",
            "description": "Attachments uploaded by the invitee during the signing journey. Returned only when enabled via the `attachment` request parameter.",
            "items": {
              "$ref": "#/components/schemas/AttachmentsArrayResponseObject"
            }
          }
        }
      },
      "DocumentCompletedApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "documents": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DocumentCompletedResponseObject"
                }
              },
              "totalCount": {
                "type": "integer",
                "description": "Total count of documents matching the given filters."
              }
            }
          }
        }
      },
      "DocumentCompletedResponseObject": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Leegality-generated unique Document ID."
          },
          "documentName": {
            "type": "string",
            "description": "Document name provided by the client."
          },
          "irn": {
            "type": "string",
            "description": "Internal reference number provided by the client."
          },
          "folderName": {
            "type": "string",
            "description": "Name of the folder in which the document is saved. Returns `null` if the document is not inside any folder."
          },
          "dateCreated": {
            "type": "string",
            "description": "Creation date of the document.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
          },
          "completionDate": {
            "type": "string",
            "description": "Completion date of the document.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`"
          }
        }
      },
      "SeriesListApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "series": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SeriesArrayResponseObject"
                }
              }
            }
          }
        }
      },
      "SeriesArrayResponseObject": {
        "type": "object",
        "properties": {
          "blocked": {
            "type": "integer",
            "description": "Number of stamps blocked."
          },
          "denomination": {
            "type": "integer",
            "description": "Denomination of stamp in the series."
          },
          "firstPartyName": {
            "type": "string",
            "description": "Name of first party."
          },
          "legend": {
            "type": "string",
            "description": "Legend to be printed on the physical stamp paper."
          },
          "purpose": {
            "type": "string",
            "description": "Purpose of stamp."
          },
          "reserved": {
            "type": "integer",
            "description": "This parameter is not supported any longer, and will only return the value `0` at all times."
          },
          "secondPartyName": {
            "type": "string",
            "description": "Name of second party."
          },
          "seriesNumber": {
            "type": "string",
            "description": "Unique series number"
          },
          "state": {
            "type": "string",
            "description": "State to which the stamp papers belong."
          },
          "total": {
            "type": "integer",
            "description": "Total number of stamps."
          },
          "underProcess": {
            "type": "integer",
            "description": "Number of stamps under process."
          },
          "unused": {
            "type": "integer",
            "description": "Number of stamps available for use."
          },
          "used": {
            "type": "integer",
            "description": "Number of stamps already used."
          }
        }
      },
      "SeriesGroupApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "seriesGroups": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SeriesGroupArrayResponseObject"
                }
              }
            }
          }
        }
      },
      "SeriesGroupArrayResponseObject": {
        "type": "object",
        "properties": {
          "groupName": {
            "type": "string",
            "description": "Name of series group."
          },
          "groupNumber": {
            "type": "string",
            "description": "Unique series group number."
          },
          "maximumValuePermitted": {
            "type": "string",
            "description": "Maximum value of the denomination for which a combination of stamp can be applied."
          },
          "series": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeriesValueArrayResponseObject"
            }
          },
          "state": {
            "type": "string",
            "description": "Name of the state of series group."
          }
        }
      },
      "SeriesValueArrayResponseObject": {
        "type": "object",
        "properties": {
          "denomination": {
            "type": "string",
            "description": "Denomination of stamp of this series."
          },
          "seriesNumber": {
            "type": "string",
            "description": "Unique series number of the series."
          }
        }
      },
      "WalletBalanceDetailsApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n**Possible values:** `1` = success, `0` = failure."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "expired": {
                "type": "integer",
                "description": "Expired eSign Credits."
              },
              "reserved": {
                "type": "integer",
                "description": "Reserved eSign Credits."
              },
              "unused": {
                "type": "integer",
                "description": "Available for use eSign Credits."
              },
              "consumed": {
                "type": "integer",
                "description": "Used eSign Credits."
              },
              "total": {
                "type": "integer",
                "description": "Total eSign Credits."
              }
            }
          }
        }
      },
      "WalletBalanceListApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n**Possible values:** `1` = success, `0` = failure."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "balances": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WalletBalanceListApiResponseObject"
                }
              }
            }
          }
        }
      },
      "WalletBalanceListApiResponseObject": {
        "type": "object",
        "properties": {
          "consumed": {
            "type": "integer",
            "description": "Consumed eSign Credits."
          },
          "expired": {
            "type": "integer",
            "description": "Expired eSign Credits."
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry date of these eSign Credits."
          },
          "purchaseDate": {
            "type": "string",
            "description": "Purchase Date of eSign Credits."
          },
          "purchaseQuantity": {
            "type": "integer",
            "description": "Purchase Quantity of eSign Credits."
          },
          "unused": {
            "type": "integer",
            "description": "Unused eSign Credits."
          }
        }
      },
      "ResendApiResponse": {
        "type": "object",
        "description": "Response wrapper for the Resend Notifications API.\n\nThe top-level `status` is `1` as long as the request format is valid. Check each item in `data.invitations` for per-invitee success or failure.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = request processed (check individual invitation statuses), `0` = request-level failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Request-level error messages. Empty array when the request is valid.\n\n**Error codes:**\n- `validator.invalid` \u2014 signUrls array is empty or exceeds 15 items\n- *(null code)* \u2014 signUrls field is missing from the request body",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/ResendData"
          }
        }
      },
      "ResendInvitationApiResponseObject": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n**Possible values:** `1` = success, `0` = failure."
          },
          "name": {
            "type": "string",
            "description": "Name of the invitee."
          },
          "email": {
            "type": "string",
            "description": "Email of the invitee."
          },
          "phone": {
            "type": "string",
            "description": "Phone Number of the invitee."
          },
          "signUrl": {
            "type": "string",
            "description": "Invitee specific URL unique to the request."
          },
          "message": {
            "type": "string",
            "description": "Status message for the resend notification."
          }
        }
      },
      "DetailsApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n**Possible values:** `1` = success, `0` = failure."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "documentId": {
                "type": "string",
                "description": "Same as the documentId passed in GET call."
              },
              "irn": {
                "type": "string",
                "description": "Internal Reference Number."
              },
              "folderId": {
                "type": "string",
                "description": "Folder ID."
              },
              "requests": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InviteeRequest"
                }
              },
              "files": {
                "type": "array",
                "description": "Base64 encoded string format of latest version of the document.",
                "items": {
                  "type": "string"
                }
              },
              "auditTrail": {
                "type": "string",
                "description": "Base64 encoded string format of the Audit Trail generated on completion of the document."
              },
              "signers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Signer"
                }
              }
            }
          }
        }
      },
      "ListApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n**Possible values:** `1` = success, `0` = failure."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "description": "Count of total number of available documents."
              },
              "documents": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ListData"
                }
              }
            }
          }
        }
      },
      "DeleteApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n**Possible values:** `1` = success, `0` = failure."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "Request": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the invitee.",
            "example": "Abhishek Sharma"
          },
          "email": {
            "type": "string",
            "description": "Email address of the invitee.",
            "example": "abhishek@example.com"
          },
          "phone": {
            "type": "string",
            "description": "Mobile number of the invitee.",
            "example": "9876543210"
          },
          "signUrl": {
            "type": "string",
            "description": "Signing URL unique to this invitee and request.",
            "example": "https://app1.leegality.com/sign/uuid-here"
          },
          "active": {
            "type": "boolean",
            "description": "Whether the signing URL is currently active."
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry date and time of the signing invite.\n\n- **Format:** `DD-MM-YYYY HH:MM:SS`\n- **Note:** If `null`, the invite expires in 45 minutes.",
            "example": "2026-03-12T18:29:59Z"
          }
        },
        "description": "Invitee details returned in the Create eSigning Request response. Contains the signing URL and invitation status for each invitee."
      },
      "InviteeRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the invitee."
          },
          "email": {
            "type": "string",
            "description": "Email of the invitee."
          },
          "phone": {
            "type": "string",
            "description": "Phone Number of the invitee."
          },
          "signUrl": {
            "type": "string",
            "description": "User specific URL unique to the request."
          },
          "active": {
            "type": "boolean",
            "description": "Status of the URL."
          },
          "signed": {
            "type": "boolean",
            "description": "Request eSigning status."
          },
          "rejected": {
            "type": "boolean",
            "description": "Request rejection status."
          },
          "expired": {
            "type": "boolean",
            "description": "Request expiration status."
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry date of the signing invite.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`\n\n> **Note:** If expiryDate is null, expiry is set as 45 minutes."
          },
          "signType": {
            "type": "string",
            "description": "The backend signature type code, present in webhook payloads after the invitee has signed.\n\n**Possible values:** `AADHAAR`, `VIRTUAL_SIGN`, `VISUAL_SIGN`, `QUICK_SIGN`, `DSC`, `NESL_ESIGN`, `OFFLINE_SIGN`, `DOC_SIGNER`, `AUTOMATED_SIGN`\n\n> **Note:** `OFFLINE_SIGN` refers to Cloud DSC."
          }
        }
      },
      "ReactivateResponseInvitation": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the invitee."
          },
          "email": {
            "type": "string",
            "description": "Email of the invitee."
          },
          "phone": {
            "type": "string",
            "description": "Phone Number of the invitee."
          },
          "signUrl": {
            "type": "string",
            "description": "User specific URL unique to the request."
          },
          "active": {
            "type": "boolean",
            "description": "Status of the URL."
          },
          "signed": {
            "type": "boolean",
            "description": "Request eSigning status."
          },
          "rejected": {
            "type": "boolean",
            "description": "Request rejection status."
          },
          "expired": {
            "type": "boolean",
            "description": "Request expiration status."
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry date of the signing invite.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`\n\n> **Note:** If expiryDate is null, expiry is set as 45 minutes."
          },
          "signType": {
            "type": "string",
            "description": "The backend signature type code, present after the invitee has signed.\n\n**Possible values:** `AADHAAR`, `VIRTUAL_SIGN`, `VISUAL_SIGN`, `QUICK_SIGN`, `DSC`, `NESL_ESIGN`, `OFFLINE_SIGN`, `DOC_SIGNER`, `AUTOMATED_SIGN`\n\n> **Note:** `OFFLINE_SIGN` refers to Cloud DSC."
          }
        }
      },
      "Signer": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of signer as contained in the Digital Signature Certificate in case of Aadhaar, DSC, NESL_ESIGN, OFFLINE_SIGN, QUICK_SIGN, Doc Signer and Automated Signer. In case of Virtual Sign and Automated Virtual Sign, the name will be the name used for eSigning the document."
          },
          "pincode": {
            "type": "string",
            "description": "PIN Code of signer as contained in the Digital Signature Certificate in case of Aadhaar, DSC, NESL_ESIGN, OFFLINE_SIGN, Doc Signer and Automated Signer. Value will be provided only if available in the certificate."
          },
          "state": {
            "type": "string",
            "description": "State of signer as contained in the Digital Signature Certificate in case of Aadhaar, DSC, NESL_ESIGN, OFFLINE_SIGN, Doc Signer and Automated Signer. Value will be provided only if available in the certificate."
          },
          "title": {
            "type": "string",
            "description": "Last 4 digits of the unique identifier of signer as contained in the Digital Signature Certificate issued after Aadhaar authentication. Only works for Aadhaar eSign, NESL_ESIGN and OFFLINE_SIGN (for accounts created with Aadhaar XML). Value will be provided only if available in the Certificate."
          }
        }
      },
      "ListData": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the document."
          },
          "documentId": {
            "type": "string",
            "description": "Document ID."
          },
          "irn": {
            "type": "string",
            "description": "Internal Reference Number."
          },
          "folderId": {
            "type": "string",
            "description": "Folder ID."
          },
          "folderName": {
            "type": "string",
            "description": "Folder Name."
          },
          "status": {
            "type": "string",
            "description": "Current status of the document.\n\n**Possible values:** `DRAFT`, `SENT`, `RECEIVED`, `SIGNED`, `COMPLETED`, `EXPIRED`"
          }
        }
      },
      "Message": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Response message code.",
            "example": "simpleWorkFlow.success"
          },
          "message": {
            "type": "string",
            "description": "Human-readable success or error message.",
            "example": "Invitations sent successfully."
          }
        },
        "description": "Message object containing a machine-readable code and a human-readable description. Used for success confirmations, errors, and warnings."
      },
      "DetailsApiResponsev3.2": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "documentId": {
                "type": "string",
                "description": "Same as the documentId passed in GET call."
              },
              "irn": {
                "type": "string",
                "description": "Internal Reference Number."
              },
              "folderId": {
                "type": "string",
                "description": "Folder ID."
              },
              "requests": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InviteeRequest"
                }
              },
              "files": {
                "type": "array",
                "description": "\nThe Content Delivery Network (CDN) URL provided in the response is valid for only **15 seconds**. During this time, users can download the file directly from the server. \nPlease note that this URL is intended only for downloading files at the server level, and should not be used for previewing content in the host application.\nDownload Method- curl (file url received from API) -output (path to store the file)",
                "items": {
                  "type": "string"
                }
              },
              "auditTrail": {
                "type": "string",
                "description": "CDN URL of the Audit Trail generated on completion of the document.\n**Note:** The Content Delivery Network (CDN) URL provided in the response is valid for only **15 seconds**. During this time, users can download the file directly from the server.\nPlease note that this URL is intended only for downloading files at the server level, and should not be used for previewing content in the host application.\nDownload Method- curl (file url received from API) -output (path to store the file)"
              },
              "signers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Signer"
                }
              }
            }
          }
        }
      },
      "DocumentDetailsApiResponsev3.2": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "if success then 1, else 0."
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "description": "\nThe Content Delivery Network (CDN) URL provided in the response is valid for only **15 seconds**. During this time, users can download the file directly from the server.\nPlease note that this URL is intended only for downloading files at the server level, and should not be used for previewing content in the host application.\nIf you disable this parameter using file key while API call,you will receive value as null.\n  \n  Download Method- curl (file url received from API) -output (path to store the file)"
              },
              "auditTrail": {
                "type": "string",
                "description": "\nThe Content Delivery Network (CDN) URL provided in the response is valid for only **15 seconds**. During this time, users can download the file directly from the server.\nPlease note that this URL is intended only for downloading files at the server level, and should not be used for previewing content in the host application.\nYou will receive value of this\n  parameter only if document is completed and you        enable the same using auditTrail key while\n  API call otherwise you will receive value as NULL.\n\nDownload Method- curl (file url received from API) --output (path to store the file)"
              },
              "documentId": {
                "type": "string",
                "description": "Leegality generated unique Document ID."
              },
              "documentName": {
                "type": "string",
                "description": "Document name provided by client."
              },
              "workflowId": {
                "type": "string",
                "description": "Leegality generated unique Workflow ID, if document generated from workflow."
              },
              "workflowName": {
                "type": "string",
                "description": "Workflow name provided by client, if document generated from workflow."
              },
              "irn": {
                "type": "string",
                "description": "Internal reference number provided by client."
              },
              "status": {
                "type": "string",
                "description": "Current status of the document, Possible values= DRAFT, SENT, COMPLETED, EXPIRED."
              },
              "creationDate": {
                "type": "string",
                "description": "Creation date of Document in format DD-MM-YYYY HH:MM:SS."
              },
              "completionDate": {
                "type": "string",
                "description": "Completion date of Document in format DD-MM-YYYY HH:MM:SS, You will receive this value only if document is completed."
              },
              "deletionDate": {
                "type": "string",
                "description": "Deletion date of Document in format DD-MM-YYYY HH:MM:SS, If you are using deleteOnComplete functionality of Leegality."
              },
              "senderName": {
                "type": "string",
                "description": "Sender Full Name."
              },
              "senderUsername": {
                "type": "string",
                "description": "Sender Email/Phone."
              },
              "folders": {
                "type": "array",
                "description": "You will receive the whole hierarchy of folders created with leegality, in order of last child folder as first element of array and parent folders goes after child folder in the array.",
                "items": {
                  "$ref": "#/components/schemas/FolderArrayResponseObject"
                }
              },
              "stamp": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/StampArrayResponseObject"
                }
              },
              "attachments": {
                "type": "array",
                "description": "You will receive this parameter only if you enable using the attachment key while making API call. This attachments parameter contains all the attachments uploaded by the Sender.",
                "items": {
                  "$ref": "#/components/schemas/AttachmentsArrayResponseObjectWithURL"
                }
              },
              "invitations": {
                "type": "array",
                "description": "This parameter contains the list of all the signers.",
                "items": {
                  "$ref": "#/components/schemas/InvitationsArrayResponseObject"
                }
              }
            }
          }
        }
      },
      "AttachmentsArrayResponseObjectWithURL": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "description": "CDN URL for the reference attachment file. Valid for only **15 seconds**. Use this URL for downloading at the server level only, not for previewing in the host application.\n\n**Download method:** `curl <file_url> -output <path_to_store>`"
          },
          "name": {
            "type": "string",
            "description": "Name of the reference attachment file."
          },
          "type": {
            "type": "string",
            "description": "MIME type of the reference attachment file.\n\n**Possible values:** `application/pdf`, `image/png`, `image/jpg`, `image/jpeg`"
          }
        }
      },
      "DocumentDetails3_3ApiResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "- `1` \u2014 success\n- `0` \u2014 failure"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "description": "CDN URL of the signed document PDF. Valid for only **15 seconds** \u2014 intended for server-level download only. Returns `null` if the `file` parameter is not `true` in the API call.\n\n**Download method:** `curl <file_url> -output <path_to_store>`"
              },
              "auditTrail": {
                "type": "string",
                "description": "CDN URL of the audit trail PDF. Valid for only **15 seconds** \u2014 intended for server-level download only. Returns `null` if the document is not completed or if the `auditTrail` parameter is not enabled in the API call.\n\n**Download method:** `curl <file_url> -output <path_to_store>`"
              },
              "document": {
                "$ref": "#/components/schemas/DocumentDetails3_1ResponseObject"
              },
              "sftp": {
                "$ref": "#/components/schemas/SftpDetails3_1ResponseObject"
              },
              "workflow": {
                "$ref": "#/components/schemas/WorkflowDetails3_1ResponseObject"
              },
              "template": {
                "$ref": "#/components/schemas/TemplateDetails3_1ResponseObject"
              },
              "account": {
                "$ref": "#/components/schemas/AccountDetails3_1ResponseObject"
              },
              "sender": {
                "$ref": "#/components/schemas/SenderDetails3_1ResponseObject"
              },
              "folders": {
                "type": "array",
                "description": "Array containing the full hierarchy of folders. The last child folder appears as the first element of the array, with parent folders following.",
                "items": {
                  "$ref": "#/components/schemas/FolderArrayResponseObject"
                }
              },
              "stampDetails": {
                "$ref": "#/components/schemas/StampDetails3_1ResponseObject"
              },
              "referenceAttachments": {
                "type": "array",
                "description": "Array of reference attachments uploaded by the sender of the document, visible to invitees during the signing journey.",
                "items": {
                  "$ref": "#/components/schemas/AttachmentsArrayResponseObjectWithURL"
                }
              },
              "neslDocumentDetails": {
                "$ref": "#/components/schemas/NeslDetails3_1ResponseObject"
              },
              "cc": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/CCArrayResponseObject"
                }
              },
              "coordinatePicker": {
                "$ref": "#/components/schemas/CoordinatePickerDetails3_1ResponseObject"
              },
              "invitations": {
                "type": "array",
                "description": "Array containing details of all invitees (signers, reviewers, coordinate pickers) associated with this document.",
                "items": {
                  "$ref": "#/components/schemas/InvitationsArray3_1ResponseObject"
                }
              }
            }
          }
        }
      },
      "neslRetryRequest": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "This parameter requires the unique Document ID generated by Leegality for every document in response to a successful create request."
          },
          "neslTransactionId": {
            "type": "string",
            "description": "This parameter requires the unique Transaction ID generated by Leegality for every NeSL document."
          }
        }
      },
      "neslRetryResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "canRetry": {
                "type": "boolean",
                "description": "Indicates whether retry is allowed for this NeSL document.\n\n- `true` \u2014 retry is allowed; call the Retry NeSL API\n- `false` \u2014 retry is not allowed"
              },
              "responseCode": {
                "type": "string",
                "description": "Response Code sent by NeSL"
              },
              "responseDescription": {
                "type": "string",
                "description": "Response message for the code received."
              },
              "retryStatus": {
                "type": "string",
                "enum": [
                  "Success",
                  "Failed"
                ],
                "description": "If Success then retry request has been Successful. If Failed, then retry request has failed."
              }
            }
          }
        }
      },
      "multipleStampSeries": {
        "type": "object",
        "properties": {
          "stampSeries": {
            "type": "string",
            "description": "Unique series number of the stamp series to use.",
            "example": "07"
          },
          "seriesQuantity": {
            "type": "string",
            "description": "Number of stamps from this series to affix to the document.\n\n- **Range:** 1 \u2013 99",
            "example": "2"
          }
        },
        "description": "Configuration for affixing multiple stamps from a specific series to the document."
      },
      "fetchDocument": {
        "type": "object",
        "properties": {
          "date": {
            "type": "object",
            "properties": {
              "file": {
                "type": "string",
                "description": "The Content Delivery Network (CDN) URL provided in the response is valid for only **15 seconds**. During this time, users can download the file directly from the server. Please note that this URL is intended only for downloading files at the server level and should not be used for previewing content in the host application."
              }
            }
          },
          "message": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Success or Error message"
          },
          "status": {
            "type": "integer",
            "description": "The status of the request. The status will be 1 for success and 0 for failure.",
            "enum": [
              0,
              1
            ]
          }
        }
      },
      "ebgNotificationList": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "notificationList": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "eventType": {
                      "type": "string",
                      "description": "Type of the event. Possible values: Amendment, Renewal, Extend_or_pay, Cancellation, Closure, Partial_invocation, Invocation."
                    },
                    "lastUpdated": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Timestamp marking the most recent update to the event notification."
                    },
                    "loanNo": {
                      "type": "string",
                      "description": "Loan number associated with the eBG notification."
                    },
                    "notifTxnId": {
                      "type": "string",
                      "description": "Unique notification transaction ID associated with the eBG notification."
                    },
                    "requestId": {
                      "type": "string",
                      "description": "Request ID associated with the eBG notification."
                    },
                    "reviewedBy": {
                      "type": "string",
                      "description": "Name of the user who reviewed the notification."
                    },
                    "status": {
                      "type": "string",
                      "description": "Review status of the notification. Possible values: Accepted, Rejected, Pending."
                    }
                  }
                }
              },
              "totalCount": {
                "type": "integer",
                "description": "Total number of notification records returned in the response."
              }
            }
          },
          "messages": {
            "type": "array",
            "description": "Additional response messages, if any.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Message code."
                },
                "message": {
                  "type": "string",
                  "description": "Message text."
                }
              }
            }
          },
          "status": {
            "type": "integer",
            "description": "API status code (e.g., 1 = success)."
          }
        }
      },
      "ebgNotificationDetails": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "notificationDetails": {
                "type": "object",
                "properties": {
                  "canReview": {
                    "type": "boolean",
                    "description": "Indicates whether the notification can be reviewed."
                  },
                  "loanDetails": {
                    "type": "array",
                    "description": "Contains details of the loan associated with the notification.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "claimExpiryDate": {
                          "type": "string",
                          "format": "date",
                          "description": "Claim expiry date of the eBG."
                        },
                        "contractRefNo": {
                          "type": "string",
                          "nullable": true,
                          "description": "Vendor contract reference number."
                        },
                        "creditSubtype": {
                          "type": "string",
                          "description": "Type of credit (e.g., GRNT for Guarantee)."
                        },
                        "currencyOfDebt": {
                          "type": "string",
                          "description": "Currency of the debt (e.g., INR)."
                        },
                        "event": {
                          "type": "string",
                          "description": "Event type (e.g., Issuance, Amendment)."
                        },
                        "expiryDate": {
                          "type": "string",
                          "format": "date",
                          "description": "Expiry date of the eBG."
                        },
                        "loanNumber": {
                          "type": "string",
                          "description": "Loan number associated with the debt."
                        },
                        "loanRemark": {
                          "type": "string",
                          "description": "Remarks or description related to the loan."
                        },
                        "sanctionAmount": {
                          "type": "string",
                          "description": "The amount sanctioned by the financial creditor."
                        },
                        "sanctionCurrency": {
                          "type": "string",
                          "description": "Currency in which the loan is sanctioned."
                        },
                        "totalOutstandingAmount": {
                          "type": "string",
                          "description": "Total outstanding amount."
                        },
                        "vendorCode": {
                          "type": "string",
                          "nullable": true,
                          "description": "Vendor code."
                        }
                      }
                    }
                  },
                  "neslTxnId": {
                    "type": "string",
                    "nullable": true,
                    "description": "Transaction ID assigned by NeSL."
                  },
                  "notifTxnId": {
                    "type": "string",
                    "description": "Unique notification transaction ID."
                  },
                  "participantDetails": {
                    "type": "array",
                    "description": "List of associated participants.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "businessUnit": {
                          "type": "string",
                          "nullable": true,
                          "description": "Business unit of the participant."
                        },
                        "contactRelation": {
                          "type": "string",
                          "description": "Relationship of the participant (e.g., Beneficiary, Creditor, Debtor)."
                        },
                        "fullName": {
                          "type": "string",
                          "description": "Full name of the participant."
                        },
                        "officialDocId": {
                          "type": "string",
                          "description": "Official document ID of the participant."
                        },
                        "officialDocType": {
                          "type": "string",
                          "description": "Type of official document (e.g., PAN card)."
                        }
                      }
                    }
                  },
                  "portalId": {
                    "type": "string",
                    "nullable": true,
                    "description": "Portal ID assigned to the creditor by NeSL."
                  },
                  "rejected": {
                    "type": "boolean",
                    "description": "Indicates if the notification request was rejected."
                  },
                  "requestDetails": {
                    "type": "object",
                    "description": "Contains details of the request that triggered the notification.",
                    "properties": {
                      "accountHolderName": {
                        "type": "string",
                        "nullable": true,
                        "description": "Name of the account holder."
                      },
                      "accountNumber": {
                        "type": "string",
                        "nullable": true,
                        "description": "Account number"
                      },
                      "bankName": {
                        "type": "string",
                        "nullable": true,
                        "description": "Name of the bank."
                      },
                      "contactMobile": {
                        "type": "string",
                        "nullable": true,
                        "description": "Contact Number"
                      },
                      "contactPersonName": {
                        "type": "string",
                        "nullable": true,
                        "description": "Full name of the contact person of the Party."
                      },
                      "department": {
                        "type": "string",
                        "nullable": true,
                        "description": "Department"
                      },
                      "emailId": {
                        "type": "string",
                        "nullable": true,
                        "description": "Email address."
                      },
                      "entityName": {
                        "type": "string",
                        "description": "Name of the requesting entity."
                      },
                      "extensionPeriod": {
                        "type": "string",
                        "nullable": true,
                        "description": "Extension Period"
                      },
                      "ifscCode": {
                        "type": "string",
                        "nullable": true,
                        "description": "IFSC Code"
                      },
                      "invocationAmount": {
                        "type": "string",
                        "nullable": true,
                        "description": "Invovation amount"
                      },
                      "requesRemarks": {
                        "type": "string",
                        "description": "Remarks provided in the request."
                      },
                      "requestDate": {
                        "type": "string",
                        "description": "Date and time when the request was made."
                      },
                      "requestId": {
                        "type": "string",
                        "description": "Unique identifier for the request."
                      },
                      "requestSource": {
                        "type": "string",
                        "description": "Source of the request (e.g., NeSLPortal)."
                      },
                      "requestType": {
                        "type": "string",
                        "description": "Type of request (e.g., AMENDMENT)."
                      },
                      "requestorRelationship": {
                        "type": "string",
                        "description": "Relationship of the requester to the debt."
                      },
                      "supportingDoc": {
                        "type": "string",
                        "description": "Path to the supporting document."
                      },
                      "userName": {
                        "type": "string",
                        "description": "Name of the user who initiated the request."
                      }
                    }
                  },
                  "reviewRemarks": {
                    "type": "string",
                    "description": "Remarks provided during review."
                  },
                  "reviewedBy": {
                    "type": "string",
                    "description": "Name of the reviewer."
                  },
                  "reviewedDate": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Date when the review was completed."
                  },
                  "status": {
                    "type": "string",
                    "description": "Status of the notification (e.g., Accepted, Rejected)."
                  },
                  "timestamp": {
                    "type": "string",
                    "nullable": true,
                    "description": "Timestamp of the notification (if available)."
                  }
                }
              }
            }
          },
          "messages": {
            "type": "array",
            "description": "Additional response messages, if any.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Message code."
                },
                "message": {
                  "type": "string",
                  "description": "Message text."
                }
              }
            }
          },
          "status": {
            "type": "integer",
            "description": "API status code (e.g., 1 = success)."
          }
        }
      },
      "ebgReviewRequest": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "requestId": {
                "type": "string",
                "description": "Unique identifier for the request."
              },
              "loanNumber": {
                "type": "string",
                "description": "The loan number associated with the eBG notification."
              },
              "reviewStatus": {
                "type": "string",
                "enum": [
                  "Accepted",
                  "Rejected"
                ],
                "description": "Status of the review."
              },
              "reviewRemarks": {
                "type": "string",
                "description": "Remarks or comments provided during the review."
              },
              "notifTxnId": {
                "type": "string",
                "description": "Unique transaction ID of the notification to be reviewed."
              }
            }
          }
        }
      },
      "ebgReviewResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object"
          },
          "messages": {
            "type": "array",
            "description": "Contains details about the response message.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Response code",
                  "example": "ebg.notification.review.success"
                },
                "message": {
                  "type": "string",
                  "description": "Review confirmation message.",
                  "example": "eBG notification review success."
                }
              },
              "required": [
                "code",
                "message"
              ]
            }
          },
          "status": {
            "type": "integer",
            "description": "Indicates API response status. `1` means success.",
            "example": 1
          }
        }
      },
      "TransactionStatusApiResponse": {
        "type": "object",
        "description": "Response wrapper for the Transaction Status API.\n\nContains the transaction data, status code, and any messages.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "Indicates API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array on success.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/TransactionStatusData"
          }
        }
      },
      "TransactionStatusData": {
        "type": "object",
        "description": "Transaction status data for a document.\n\nContains the document identifier, signing status of each invitee, download URLs for files and audit trail, and signer certificate data for signed documents.",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Unique identifier of the document.\n\n- **Format:** Alphanumeric string.",
            "example": "01KJCHZ1Z3XRFP04DPT195AJH6"
          },
          "irn": {
            "type": "string",
            "description": "Invitation Reference Number \u2014 the unique reference you passed when creating the eSigning request.\n\nReturns `null` if no IRN was set during document creation.",
            "example": "INV-2026-001"
          },
          "folderId": {
            "type": "string",
            "description": "Unique identifier of the folder the document belongs to.\n\nReturns `null` if the document is not assigned to any folder.",
            "nullable": true
          },
          "files": {
            "type": "array",
            "description": "CDN download URLs for the document PDF(s).\n\nAlways present in the response, even for unsigned or rejected documents. URLs are time-limited and will expire.",
            "items": {
              "type": "string",
              "description": "CDN download URL for a document PDF.",
              "example": "https://sandbox-downloads.leegality.com/export/2026/03/02/c9845ec1-..."
            }
          },
          "auditTrail": {
            "type": "string",
            "description": "CDN download URL for the audit trail PDF.\n\n**Only present when the document has been signed/completed.** For unsigned, rejected, or expired documents, this field is absent from the response.\n\nThe URL is time-limited and will expire.",
            "example": "https://sandbox-downloads.leegality.com/export/2026/03/02/a441a5e8-..."
          },
          "requests": {
            "type": "array",
            "description": "Array of invitee (signer/approver) status objects.\n\nEach entry represents one invitee and their current signing status.",
            "items": {
              "$ref": "#/components/schemas/TransactionStatusRequest"
            }
          },
          "signers": {
            "type": "array",
            "description": "Certificate data extracted from the digital signature of each signer.\n\n**Only present when the document has been signed/completed.** For unsigned, rejected, or expired documents, this field is absent from the response.\n\nContains verified identity information from the signer's Aadhaar certificate.",
            "items": {
              "$ref": "#/components/schemas/TransactionStatusSigner"
            }
          }
        }
      },
      "TransactionStatusRequest": {
        "type": "object",
        "description": "Signing status of an individual invitee.\n\nUses boolean fields (`signed`, `rejected`, `expired`) to indicate the invitee's current state.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Full name of the invitee.",
            "example": "Abhishek Sharma"
          },
          "email": {
            "type": "string",
            "description": "Email address of the invitee.",
            "example": "signer@example.com"
          },
          "phone": {
            "type": "string",
            "description": "Mobile number of the invitee.\n\n- **Format:** 10-digit Indian mobile number.",
            "example": "9876543210"
          },
          "signUrl": {
            "type": "string",
            "description": "Unique signing URL for this invitee.\n\nThe invitee uses this URL to access the signing page.",
            "example": "https://sandbox.leegality.com/sign/2bdcc3ef-661f-440c-b059-82c0ff6ce4d8"
          },
          "signed": {
            "type": "boolean",
            "description": "Whether the invitee has signed the document.\n\n- `true` \u2014 signed\n- `false` \u2014 not yet signed",
            "example": true
          },
          "rejected": {
            "type": "boolean",
            "description": "Whether the invitee has rejected the document.\n\n- `true` \u2014 explicitly rejected by the invitee\n- `false` \u2014 not rejected",
            "example": false
          },
          "expired": {
            "type": "boolean",
            "description": "Whether the invitee's signing invitation has expired.\n\n- `true` \u2014 expired (time-based expiry or verification failure)\n- `false` \u2014 not expired\n\n- **Note:** Also set to `true` when certificate verification fails during signing (e.g., Aadhaar details mismatch, DSC details mismatch).",
            "example": false
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry date and time for the signing invitation.\n\n- **Format:** `dd-MM-yyyy HH:mm:ss`",
            "example": "08-03-2026 23:59:59"
          },
          "signType": {
            "type": "string",
            "description": "Type of signature used by the invitee.\n\nReturns `null` if the invitee has not signed yet.\n\n- **Possible values:** `AADHAAR`, `VIRTUAL`, `DSC`",
            "nullable": true,
            "example": "AADHAAR",
            "enum": [
              "AADHAAR",
              "VIRTUAL",
              "DSC"
            ]
          },
          "active": {
            "type": "boolean",
            "description": "Whether it is currently the invitee's turn to act.\n\n- `true` \u2014 the invitee can currently sign or approve the document",
            "example": true
          }
        }
      },
      "TransactionStatusSigner": {
        "type": "object",
        "description": "Certificate data extracted from a signer's digital signature.\n\nContains verified identity information from the Aadhaar certificate used during signing.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Full name as it appears on the signer's Aadhaar certificate.",
            "example": "Abhishek Sharma"
          },
          "pincode": {
            "type": "string",
            "description": "Pincode from the signer's Aadhaar certificate.\n\n- **Format:** 6-digit string.",
            "example": "247667"
          },
          "state": {
            "type": "string",
            "description": "State from the signer's Aadhaar certificate.",
            "example": "Uttarakhand"
          },
          "title": {
            "type": "string",
            "description": "Title/locality code from the signer's Aadhaar certificate.\n\nThis is typically a numeric code representing the locality.",
            "example": "3870"
          }
        }
      },
      "ReactivateData": {
        "type": "object",
        "description": "Reactivation result data.\n\nOn success, contains the document details and updated invitee statuses with the new expiry. On failure, this is an empty object `{}`.",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Unique identifier of the reactivated document.",
            "example": "01KJCHYRSQGA24YDZ044BS6MTS"
          },
          "irn": {
            "type": "string",
            "description": "Invitation Reference Number set during document creation.\n\nReturns `null` if no IRN was set.",
            "example": "INV-2026-001"
          },
          "requests": {
            "type": "array",
            "description": "Array of invitee status objects with updated expiry.\n\nAfter reactivation, `expired` resets to `false` and `expiryDate` reflects the new expiry period. The `signUrl` remains the same as the original invitation.",
            "items": {
              "$ref": "#/components/schemas/TransactionStatusRequest"
            }
          }
        }
      },
      "DeleteDocumentApiResponse": {
        "type": "object",
        "description": "Response wrapper for the Delete Document API.\n\nOn success (`status: 1`), `data` is an empty object. On failure (`status: 0`), `messages` contains the error details.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success (document deleted), `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages.\n\n**Success codes:**\n- `document.delete.success` \u2014 Document deleted successfully\n\n**Error codes:**\n- `no.document.found` \u2014 Document ID does not exist\n- `document.id.required` \u2014 documentId query parameter is missing or empty",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "description": "Always an empty object `{}` for this endpoint."
          }
        }
      },
      "ListDocumentsApiResponse": {
        "type": "object",
        "description": "Response wrapper for the List Documents API.\n\nOn success (`status: 1`), `data` contains the total count and array of matching documents.\n\nOn failure (`status: 0`), `messages` contains the error details.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array on success.\n\n**Error codes:**\n- `typeMismatch` \u2014 Invalid value for `status` parameter",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/ListDocumentsData"
          }
        }
      },
      "ListDocumentsData": {
        "type": "object",
        "description": "Paginated list of documents matching the search criteria.\n\n`total` represents the total number of matching documents across all pages, while `documents` contains only the current page of results.",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of documents matching the search/filter criteria.\n\nUse this with `max` and `offset` to calculate pagination.",
            "example": 233
          },
          "documents": {
            "type": "array",
            "description": "Array of document summary objects for the current page.",
            "items": {
              "$ref": "#/components/schemas/ListDocumentItem"
            }
          }
        }
      },
      "ListDocumentItem": {
        "type": "object",
        "description": "Summary of a document in the list results.",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Unique identifier of the document.",
            "example": "01KGRZ2F9YNZ828PYDYE29JYZS"
          },
          "name": {
            "type": "string",
            "description": "Name of the document (typically the uploaded PDF filename).",
            "example": "Loan-Agreement.pdf"
          },
          "irn": {
            "type": "string",
            "description": "Internal Reference Number set during document creation.\n\nReturns `null` if no IRN was set.",
            "nullable": true,
            "example": "INV-2026-001"
          },
          "status": {
            "type": "string",
            "description": "Current status of the document.",
            "enum": [
              "DRAFT",
              "SENT",
              "RECEIVED",
              "SIGNED",
              "COMPLETED",
              "EXPIRED"
            ],
            "example": "COMPLETED"
          },
          "folderId": {
            "type": "string",
            "description": "Unique identifier of the folder the document belongs to.\n\nReturns `null` if not in a folder.",
            "nullable": true
          },
          "folderName": {
            "type": "string",
            "description": "Name of the folder the document belongs to.\n\nReturns `null` if not in a folder.",
            "nullable": true
          }
        }
      },
      "ResendRequest": {
        "type": "object",
        "required": [
          "signUrls"
        ],
        "description": "Request body for resending signing notifications.",
        "properties": {
          "signUrls": {
            "type": "array",
            "description": "Array of sign URLs to resend notifications for.\n\n**Size:** 1 to 15 URLs per request.\n\nEach URL can be either the full signing URL or just the UUID portion.\n\nGet the sign URLs from the **Create eSigning request** API response, **Check transaction status** API, or **Check document details** API.",
            "minItems": 1,
            "maxItems": 15,
            "items": {
              "type": "string"
            },
            "example": [
              "https://sandbox.leegality.com/sign/2bdcc3ef-661f-440c-b059-82c0ff6ce4d8"
            ]
          }
        }
      },
      "ResendData": {
        "type": "object",
        "description": "Resend result data.\n\nContains per-invitee results. On request-level failure, this is an empty object `{}`.",
        "properties": {
          "invitations": {
            "type": "array",
            "description": "Array of per-invitee resend results. One entry per sign URL in the request.",
            "items": {
              "$ref": "#/components/schemas/ResendInvitationResult"
            }
          }
        }
      },
      "ResendInvitationResult": {
        "type": "object",
        "description": "Result of resending a notification for a single invitee.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "Per-invitee resend status.\n\n`1` = notification resent successfully, `0` = resend failed for this invitee.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the invitee.\n\nReturns `null` if the sign URL is invalid.",
            "nullable": true,
            "example": "Abhishek Sharma"
          },
          "email": {
            "type": "string",
            "description": "Email address of the invitee.\n\nReturns `null` if the sign URL is invalid.",
            "nullable": true,
            "example": "signer@example.com"
          },
          "phone": {
            "type": "string",
            "description": "Mobile number of the invitee.\n\nReturns `null` if no phone was provided or if the sign URL is invalid.",
            "nullable": true,
            "example": "9876543210"
          },
          "signUrl": {
            "type": "string",
            "description": "The sign URL that was processed. Returns the full URL even if only the UUID was passed in the request.",
            "example": "https://sandbox.leegality.com/sign/2bdcc3ef-661f-440c-b059-82c0ff6ce4d8"
          },
          "message": {
            "type": "string",
            "description": "Human-readable result message for this invitee.\n\n**Success:**\n- `Invitation(s) sent successfully. Please ask invitees to check their inbox.`\n\n**Failure:**\n- `Document(s) already signed by the invitee.`\n- `You do not have access to the document.`\n- `You have already resent invitation mail 5 times. Please contact support@leegality.com for help.`",
            "example": "Invitation(s) sent successfully. Please ask invitees to check their inbox."
          }
        }
      },
      "CompletedDocumentsApiResponse": {
        "type": "object",
        "description": "Response for the List Completed Documents API.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = Success\n\n`0` = Failure (e.g., invalid date format)",
            "example": 1
          },
          "data": {
            "$ref": "#/components/schemas/CompletedDocumentsData"
          },
          "messages": {
            "type": "array",
            "description": "Array of error/validation messages. Empty array on success.\n\nOn validation failure (e.g., invalid date format), contains objects with `code` and `message` fields.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "CompletedDocumentsData": {
        "type": "object",
        "description": "Contains the paginated list of completed documents and the total count.",
        "properties": {
          "totalCount": {
            "type": "integer",
            "description": "Total number of completed documents matching the applied filters.\n\nThis count reflects all matching documents, not just those in the current page. Use this with `max` and `offset` to implement pagination.",
            "example": 130
          },
          "documents": {
            "type": "array",
            "description": "Array of completed document objects, sorted in **ascending order** by `completionDate` (oldest first).\n\nThe number of items is limited by the `max` parameter (default 20, maximum 40).",
            "items": {
              "$ref": "#/components/schemas/CompletedDocumentItem"
            }
          }
        }
      },
      "CompletedDocumentItem": {
        "type": "object",
        "description": "A completed document summary object.",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "The unique identifier for the document, generated by Leegality when the eSigning request was created.",
            "example": "FR601AA019"
          },
          "documentName": {
            "type": "string",
            "description": "The name of the document as specified when creating the eSigning request.\n\n> **Note:** This field is named `documentName` (not `name` as in the List Documents API).",
            "example": "Template-VuMT"
          },
          "irn": {
            "type": "string",
            "nullable": true,
            "description": "Invoice Reference Number associated with the document. Returns `null` if no IRN was assigned.",
            "example": "12222223"
          },
          "completionDate": {
            "type": "string",
            "description": "The date and time when the document was completed (all signatures collected).\n\n**Format:** `yyyy-MM-dd HH:mm:ss.S`\n\nDocuments are sorted by this field in ascending order.",
            "example": "2024-01-02 11:20:04.0"
          },
          "dateCreated": {
            "type": "string",
            "description": "The date and time when the eSigning request was created.\n\n**Format:** `yyyy-MM-dd HH:mm:ss.S`",
            "example": "2024-01-02 11:17:36.0"
          },
          "folderId": {
            "type": "string",
            "nullable": true,
            "description": "The unique identifier of the folder containing this document. Returns `null` if the document is not in a folder.",
            "example": null
          },
          "folderName": {
            "type": "string",
            "nullable": true,
            "description": "The name of the folder containing this document. Returns `null` if the document is not in a folder.",
            "example": null
          }
        }
      },
      "FetchDocumentApiResponse": {
        "type": "object",
        "description": "Response for the Fetch Document API.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = Success \u2014 the `data.file` field contains the CDN download URL\n\n`0` = Failure \u2014 check the `messages` array for error details",
            "example": 1
          },
          "data": {
            "$ref": "#/components/schemas/FetchDocumentData"
          },
          "messages": {
            "type": "array",
            "description": "Array of error/validation messages. Empty array `[]` on success.\n\n**Common error codes:**\n- `no.document.found` \u2014 Document ID not found or document is not in COMPLETED status\n- `document.download.type` \u2014 Invalid `documentDownloadType` value (case-sensitive, must be uppercase)\n- `no.attachments.exists` \u2014 No attachments exist for the given document ID\n- `index.out.of.bound` \u2014 Index exceeds the number of available files\n- `index.not.negative` \u2014 Negative index value passed\n- `invitation.not.found` \u2014 Invalid `supportDocumentUrl` (invitee not found)\n- `validator.invalid` \u2014 Required parameter missing or invalid",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "FetchDocumentData": {
        "type": "object",
        "description": "Contains the CDN download URL for the requested file. Empty object `{}` on failure.",
        "properties": {
          "file": {
            "type": "string",
            "description": "A temporary CDN download URL for the requested file.\n\n**Important:**\n- The URL expires in **15 seconds**. Download the file immediately at the server level.\n- Do not use this URL for previewing files in a browser \u2014 it is intended for server-side downloads only.\n- Each API call generates a **unique URL**. If the URL expires, simply call the API again to get a new one.\n\n**URL format:** `https://<domain>/export/<date>/<uuid>?Expires=<epoch>&Signature=<sig>&Key-Pair-Id=<key>`",
            "example": "https://sandbox-downloads.leegality.com/export/2026/03/05/70476a7c-17bc-4d32-ae64-6687200ca73d?Expires=1772689002&Signature=...&Key-Pair-Id=..."
          }
        }
      },
      "FetchDocumentBinaryErrorResponse": {
        "type": "object",
        "description": "Error response returned when the fetch request fails. On success, this endpoint returns raw binary data (not JSON), so this schema only applies to error responses.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "`0` = Failure",
            "example": 0
          },
          "data": {
            "type": "object",
            "description": "Empty object `{}` on error.",
            "example": {}
          },
          "messages": {
            "type": "array",
            "description": "Array of error/validation messages.\n\n**Error codes:**\n- `document.not.completed` \u2014 `AUDIT_TRAIL` was requested but the document has not been fully completed yet\n- `document.download.type` \u2014 Invalid or unsupported `documentDownloadType` value, including passing multiple values in the same request\n- `no.document.found` \u2014 Document ID not found or you do not have access to it\n- `no.attachments.exists` \u2014 No attachments exist for the given document\n- `index.out.of.bound` \u2014 Index exceeds the number of available files\n- `index.not.negative` \u2014 A negative index value was passed\n- `invitation.not.found` \u2014 Invalid `supportDocumentUrl` (invitee not found)\n- `validator.invalid` \u2014 A required parameter is missing or invalid",
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "example": [
              {
                "code": "document.not.completed",
                "message": "Document has not been completed yet. Audit trail cannot be downloaded for incomplete documents."
              }
            ]
          }
        }
      },
      "ActivateInvitationApiResponse": {
        "type": "object",
        "description": "Response for the Activate Invitation API.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = Success \u2014 the invitation has been activated\n\n`0` = Failure \u2014 check the `messages` array for error details",
            "example": 1
          },
          "data": {
            "type": "object",
            "description": "Empty object `{}` for both success and error responses.",
            "example": {}
          },
          "messages": {
            "type": "array",
            "description": "Array of messages. Unlike most other APIs, this field contains a message on **both success and failure**.\n\n**Success code:**\n- `invitation.activate.success` \u2014 Invitation activated successfully. The invitee will receive a notification to sign.\n\n**Error codes:**\n- `sign.url.required` \u2014 The `signUrl` parameter is missing or empty\n- `invitation.not.found` \u2014 The sign URL is invalid or you do not have access to the document\n- `invitation.already.activated` \u2014 The invitation is already active (no action needed)\n- `invitation.signed` \u2014 The invitation has already been completed (signed/approved)\n- `invitation.expired` \u2014 The invitation has expired. Use the [Reactivate document](/document-execution/api/reactivate-document) API to reactivate expired invitations\n- `invitation.completed` \u2014 The document has already been completed (all signatures collected)\n- `invitation.manual.activation.not.allowed` \u2014 NeSL invitations cannot be manually activated\n- `sign.invitation.rejected` \u2014 The invitation was rejected by the signer. Re-invite the signer first",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "DocSignerRequest": {
        "type": "object",
        "required": [
          "signUrl",
          "profileId",
          "consent"
        ],
        "description": "Request body for the eSign DocSigner Invitation API.",
        "properties": {
          "signUrl": {
            "type": "string",
            "description": "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.\n\nThe sign URL is returned in the Create eSigning Request API response.\n\n> **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`.",
            "example": "https://sandbox.leegality.com/sign/6069cd1e-961f-47b1-bd27-ac7ba1d7363c"
          },
          "profileId": {
            "type": "string",
            "description": "The unique identifier of the DocSigner profile saved in the invitee's Leegality dashboard.\n\n**How to find it:** Log into the signer's dashboard and navigate to:\nSettings > eSignature & Seal > Document Signer Certificate\n\nThis can be any valid DocSigner profile \u2014 whether hosted on Leegality's server or the client's own server.",
            "example": "d4NrfHV"
          },
          "consent": {
            "type": "string",
            "description": "The exact consent string required to authorize the eSigning. You must pass this string **exactly as shown** \u2014 any changes (including case, spacing, or punctuation) will result in an `invalid.consent` error.\n\n**Required value:**\n`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.`",
            "example": "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."
          }
        }
      },
      "DocSignerApiResponse": {
        "type": "object",
        "description": "Response for the eSign DocSigner Invitation API.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = Success \u2014 the document has been signed with the DocSigner certificate\n\n`0` = Failure \u2014 check the `messages` array for error details",
            "example": 1
          },
          "data": {
            "type": "object",
            "description": "Empty object `{}` for both success and error responses.",
            "example": {}
          },
          "messages": {
            "type": "array",
            "description": "Array of messages. Unlike most other APIs, this field contains a message on **both success and failure**.\n\n**Success code:**\n- `signing.success` \u2014 The document has been signed successfully\n\n**Error codes:**\n- `invitation.not.exists` \u2014 The invitation was not found. This can mean:\n  - The sign URL is invalid or does not exist\n  - The invitation is not a DocSigner type\n  - The invitation has already been signed\n  - The invitation has expired or the document is completed\n  - The auth token does not belong to the invitee's account\n- `invalid.consent` \u2014 The consent string does not match the required exact text\n- `profile.not.exists` \u2014 The DocSigner profile ID is invalid or not found in the invitee's account",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          }
        }
      },
      "DeleteInvitationApiResponse": {
        "type": "object",
        "description": "Response wrapper for the Delete Invitation API.\n\nOn success (`status: 1`), `data` is an empty object and `messages` contains `invitation.deleted.success`.\n\nOn failure (`status: 0`), `data` is an empty object and `messages` contains the error details.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success (invitation deleted), `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages.\n\n**Success codes:**\n- `invitation.deleted.success` \u2014 Invitation deleted successfully. The invitee will no longer be able to access the document.\n\n**Error codes:**\n- `sign.url.required` \u2014 The `signUrl` query parameter is missing or empty\n- `invitation.not.exists` \u2014 The invitation was not found. This can mean:\n  - The sign URL is invalid or does not exist\n  - The invitation has already been signed (signed invitations cannot be deleted)\n  - The invitation was already deleted\n  - The document is completed",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "description": "Always an empty object `{}` for this endpoint."
          }
        }
      },
      "CompleteDocumentRequest": {
        "type": "object",
        "required": [
          "documentId"
        ],
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Unique identifier of the document to mark as complete.\n\n**Format:** Alphanumeric string.\n\nGet from the **Create eSigning request** API response or from the dashboard.",
            "example": "01KJCHYRSQGA24YDZ044BS6MTS"
          }
        }
      },
      "CompleteDocumentApiResponse": {
        "type": "object",
        "description": "Response wrapper for the Mark Document Complete API.\n\nOn success (`status: 1`), `data` is an empty object and the document status changes to COMPLETED.\n\nOn failure (`status: 0`), `data` is an empty object and `messages` contains the error details.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success (document marked as complete), `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages.\n\n**Error codes:**\n- `no.document.found` \u2014 The document ID does not exist or is not accessible\n- `document.already.completed` \u2014 The document has already been completed (all invitees signed or previously force-completed)\n\n**Validation errors (code is `null`):**\n- `Property documentId cannot be null` \u2014 The `documentId` field is missing, null, or empty in the request body",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "type": "object",
            "description": "Always an empty object `{}` for this endpoint."
          }
        }
      },
      "StampSeriesListApiResponse": {
        "type": "object",
        "description": "Response wrapper for the List Stamp Series API.\n\nOn success (`status: 1`), `data.seriesList` contains the array of stamp series. The `messages` array is empty on success.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array `[]` on success.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/StampSeriesListData"
          }
        }
      },
      "StampSeriesListData": {
        "type": "object",
        "description": "Contains the list of stamp series in the account.",
        "properties": {
          "seriesList": {
            "type": "array",
            "description": "Array of stamp series objects. Each object represents one stamp paper series configured in the account.",
            "items": {
              "$ref": "#/components/schemas/StampSeriesItem"
            }
          }
        }
      },
      "StampSeriesItem": {
        "type": "object",
        "description": "Details of a single stamp paper series.\n\nThe `seriesNumber`, `state`, and `denomination` fields are always present. All other fields are only included when their corresponding query parameter is set to `true`.",
        "properties": {
          "seriesNumber": {
            "type": "string",
            "description": "Unique series number identifying this stamp series.\n\n**Format:** Numeric string, typically zero-padded (e.g., `\"01\"`, `\"07\"`).\n\nThis is the same value used in the `stampSeries` field of the Create eSigning request API.",
            "example": "07"
          },
          "state": {
            "type": "string",
            "description": "Indian state for which the stamp paper is issued.\n\n**Examples:** `\"Maharashtra\"`, `\"Delhi\"`, `\"Tamil Nadu\"`, `\"All States Revenue Stamp\"`.",
            "example": "Delhi"
          },
          "denomination": {
            "type": "number",
            "description": "Stamp paper denomination (face value) in Indian Rupees.\n\n**Format:** Decimal number (e.g., `100.0`, `53.0`, `10.0`).",
            "example": 53
          },
          "firstPartyName": {
            "type": "string",
            "description": "Name of the first party configured for this series.\n\nOnly present when `firstPartyName=true` is passed.",
            "example": "ABCD Limited"
          },
          "secondPartyName": {
            "type": "string",
            "description": "Name of the second party configured for this series.\n\nOnly present when `secondPartyName=true` is passed.",
            "example": "Second party name"
          },
          "purpose": {
            "type": "string",
            "description": "Purpose or use case configured for this series.\n\nOnly present when `purpose=true` is passed.",
            "example": "General agreement (as per use case)"
          },
          "legend": {
            "type": "string",
            "description": "Legend text printed on the stamp paper. This is the descriptive text that appears on the physical stamp paper.\n\nOnly present when `legend=true` is passed.",
            "example": "This Stamp Paper forms an integral part of the agreement bearing unique ID No. (Doc. ID.,) , executed between tees and the Borrower."
          },
          "underProcess": {
            "type": "integer",
            "description": "Number of stamps currently under process in this series.\n\nOnly present when `underProcess=true` is passed.",
            "example": 0
          },
          "blocked": {
            "type": "integer",
            "description": "Number of blocked stamps in this series.\n\nOnly present when `blocked=true` is passed.",
            "example": 3
          },
          "reserved": {
            "type": "integer",
            "description": "Number of reserved stamps in this series.\n\nOnly present when `reserved=true` is passed.",
            "example": 0
          },
          "unused": {
            "type": "integer",
            "description": "Number of unused (available) stamps in this series.\n\nOnly present when `unused=true` is passed.",
            "example": 258
          },
          "used": {
            "type": "integer",
            "description": "Number of used stamps in this series.\n\nOnly present when `used=true` is passed.",
            "example": 142
          },
          "expired": {
            "type": "integer",
            "description": "Number of expired stamps in this series.\n\nOnly present when `expired=true` is passed.",
            "example": 0
          },
          "total": {
            "type": "integer",
            "description": "Total number of stamps in this series (across all statuses).\n\n**Formula:** `total` = `unused` + `underProcess` + `blocked` + `used` + `expired` + `reserved`.\n\nOnly present when `total=true` is passed.",
            "example": 400
          }
        }
      },
      "StampSeriesExpiryApiResponse": {
        "type": "object",
        "description": "Response wrapper for the List Expiring Stamp Series API.\n\nOn success (`status: 1`), `data.seriesList` contains the array of expiring stamp series. The `messages` array is empty on success.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array `[]` on success.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/StampSeriesExpiryData"
          }
        },
        "title": "StampSeriesExpiryApiResponse"
      },
      "StampSeriesExpiryData": {
        "type": "object",
        "description": "Contains the list of expiring stamp series.",
        "properties": {
          "seriesList": {
            "type": "array",
            "description": "Array of stamp series expiry entries. Each entry represents a unique combination of series number, purchase date, and expiry date.\n\nThe same series number can appear multiple times if stamps were purchased in separate batches with different expiry dates.\n\nSorted in ascending order by expiry date (earliest expiry first).",
            "items": {
              "$ref": "#/components/schemas/StampSeriesExpiryItem"
            }
          }
        },
        "title": "StampSeriesExpiryData"
      },
      "StampSeriesExpiryItem": {
        "type": "object",
        "description": "Details of a single stamp series expiry entry.\n\nEach entry represents one batch of stamps with a specific purchase and expiry date. The same series number can appear multiple times with different dates.",
        "properties": {
          "expiryDate": {
            "type": "string",
            "description": "Expiry date and time of the stamp batch.\n\n**Format:** `DD-MM-YYYY HH:MM:SS` (e.g., `\"31-12-2025 23:59:59\"`).\n\nThe time component is always `23:59:59` (end of day).",
            "example": "31-12-2025 23:59:59"
          },
          "purchaseDate": {
            "type": "string",
            "description": "Purchase date and time of the stamp batch.\n\n**Format:** `DD-MM-YYYY HH:MM:SS` (e.g., `\"15-01-2025 12:30:45\"`).\n\nContains the actual timestamp of when the stamps were purchased.",
            "example": "15-01-2025 12:30:45"
          },
          "quantity": {
            "type": "integer",
            "description": "Number of stamps in this batch.",
            "example": 50
          },
          "seriesNumber": {
            "type": "string",
            "description": "Series number identifying the stamp series.\n\n**Format:** Numeric string, typically zero-padded (e.g., `\"01\"`, `\"07\"`).\n\nThis is the same value used in the `stampSeries` field of the Create eSigning request API and in the List Stamp Series API.",
            "example": "07"
          }
        },
        "title": "StampSeriesExpiryItem"
      },
      "StampGroupListApiResponse": {
        "type": "object",
        "description": "Response wrapper for the List Stamp Groups API.\n\nOn success (`status: 1`), `data.seriesGroups` contains the array of stamp groups. The `messages` array is empty on success.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array `[]` on success.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/StampGroupListData"
          }
        },
        "title": "StampGroupListApiResponse"
      },
      "StampGroupListData": {
        "type": "object",
        "description": "Contains the list of stamp groups in the account.",
        "properties": {
          "seriesGroups": {
            "type": "array",
            "description": "Array of stamp group objects. Each object represents one stamp group configured in the account.",
            "items": {
              "$ref": "#/components/schemas/StampGroupItem"
            }
          }
        },
        "title": "StampGroupListData"
      },
      "StampGroupItem": {
        "type": "object",
        "description": "Details of a single stamp group.\n\nA stamp group bundles one or more stamp series under a common identifier, state, and maximum value limit.",
        "properties": {
          "groupName": {
            "type": "string",
            "description": "Display name of the stamp group.",
            "example": "DL"
          },
          "groupNumber": {
            "type": "string",
            "description": "Unique identifier for the stamp group.\n\n**Format:** State abbreviation followed by a number (e.g., `\"MH01\"`, `\"DL02\"`).",
            "example": "DL01"
          },
          "maximumValuePermitted": {
            "type": "string",
            "description": "Maximum stamp value allowed for this group, in Indian Rupees.\n\n**Format:** Numeric string (e.g., `\"10000\"`, `\"1500\"`).",
            "example": "10000"
          },
          "series": {
            "type": "array",
            "description": "Stamp series belonging to this group.",
            "items": {
              "$ref": "#/components/schemas/StampGroupSeriesItem"
            }
          },
          "state": {
            "type": "string",
            "description": "Indian state associated with this stamp group.\n\n**Examples:** `\"Maharashtra\"`, `\"Delhi\"`.",
            "example": "Delhi"
          }
        },
        "title": "StampGroupItem"
      },
      "StampGroupSeriesItem": {
        "type": "object",
        "description": "A stamp series within a stamp group.",
        "properties": {
          "denomination": {
            "type": "string",
            "description": "Stamp paper denomination (face value) in Indian Rupees.\n\n**Format:** Decimal string (e.g., `\"100.0\"`, `\"53.0\"`).",
            "example": "100.0"
          },
          "seriesNumber": {
            "type": "string",
            "description": "Series number identifying the stamp series.\n\n**Format:** Numeric string, typically zero-padded (e.g., `\"01\"`, `\"07\"`).\n\nThis matches the `seriesNumber` from the List Stamp Series API.",
            "example": "03"
          }
        },
        "title": "StampGroupSeriesItem"
      },
      "WalletBalanceApiResponse": {
        "type": "object",
        "description": "Response wrapper for the Get Wallet Balance API.\n\nOn success (`status: 1`), `data` contains the wallet balance breakdown. The `messages` array is empty on success.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array `[]` on success.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/WalletBalanceData"
          }
        },
        "title": "WalletBalanceApiResponse"
      },
      "WalletBalanceData": {
        "type": "object",
        "description": "eSign wallet balance breakdown.\n\n**Balance math:** `total` = `expired` + `consumed` + `unused` + `reserved`.",
        "properties": {
          "expired": {
            "type": "number",
            "description": "Number of eSign credits that have expired.",
            "example": 0
          },
          "reserved": {
            "type": "number",
            "description": "Number of eSign credits currently reserved for in-progress documents.",
            "example": 651
          },
          "unused": {
            "type": "number",
            "description": "Number of eSign credits available for use.",
            "example": 13194
          },
          "consumed": {
            "type": "number",
            "description": "Number of eSign credits that have been consumed.",
            "example": 4190
          },
          "total": {
            "type": "number",
            "description": "Total number of eSign credits in the account.\n\n**Formula:** `total` = `expired` + `consumed` + `unused` + `reserved`.",
            "example": 18035
          }
        },
        "title": "WalletBalanceData"
      },
      "WalletPurchaseListApiResponse": {
        "type": "object",
        "description": "Response wrapper for the List eSign Purchases API.\n\nOn success (`status: 1`), `data.balances` contains the array of purchase entries. The `messages` array is empty on success.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array `[]` on success.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/WalletPurchaseListData"
          }
        },
        "title": "WalletPurchaseListApiResponse"
      },
      "WalletPurchaseListData": {
        "type": "object",
        "description": "Contains the list of eSign purchase entries.",
        "properties": {
          "balances": {
            "type": "array",
            "description": "Array of eSign purchase entries, sorted by purchase date (oldest first).",
            "items": {
              "$ref": "#/components/schemas/WalletPurchaseItem"
            }
          }
        },
        "title": "WalletPurchaseListData"
      },
      "WalletPurchaseItem": {
        "type": "object",
        "description": "Details of a single eSign purchase.\n\n**Purchase math:** `purchaseQuantity` = `consumed` + `unused` + `expired`.",
        "properties": {
          "consumed": {
            "type": "number",
            "description": "Number of eSign credits consumed from this purchase.",
            "example": 420
          },
          "expired": {
            "type": "number",
            "description": "Number of eSign credits that have expired from this purchase.",
            "example": 0
          },
          "expiryDate": {
            "type": "string",
            "description": "Expiry date and time of this purchase.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`.",
            "example": "29-05-2025 16:02:12"
          },
          "purchaseDate": {
            "type": "string",
            "description": "Date and time when this purchase was made.\n\n**Format:** `DD-MM-YYYY HH:MM:SS`.",
            "example": "29-05-2024 16:02:12"
          },
          "purchaseQuantity": {
            "type": "number",
            "description": "Total number of eSign credits in this purchase.\n\n**Formula:** `purchaseQuantity` = `consumed` + `unused` + `expired`.",
            "example": 435
          },
          "unused": {
            "type": "number",
            "description": "Number of eSign credits still available from this purchase.",
            "example": 15
          }
        },
        "title": "WalletPurchaseItem"
      },
      "NeslRetryRequest": {
        "type": "object",
        "description": "Request body for retrying a NeSL transaction.\n\nAt least one of `documentId` or `neslTransactionId` must be provided.",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "Unique Document ID generated by Leegality for every document in response to a successful create request.",
            "example": "01KJ7APCJHJZGNRPXWX88MMCRG"
          },
          "neslTransactionId": {
            "type": "string",
            "description": "Unique Transaction ID generated by Leegality for every NeSL document.",
            "example": "kKoJTQ20Pu"
          }
        },
        "title": "NeslRetryRequest"
      },
      "NeslRetryApiResponse": {
        "type": "object",
        "description": "Response wrapper for the Retry NeSL Transaction API.\n\nOn a successful retry, `data.retryStatus` is `\"SUCCESS\"`. On failure, `data` contains the NeSL error details. When input validation fails (missing IDs, document not found), `data` is empty and errors appear in `messages`.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 0,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array `[]` when the retry request reaches NeSL (regardless of retry outcome).",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/NeslRetryData"
          }
        },
        "title": "NeslRetryApiResponse"
      },
      "NeslRetryData": {
        "type": "object",
        "description": "NeSL retry result details.\n\nThis object is empty when input validation fails (missing IDs, document not found).",
        "properties": {
          "canRetry": {
            "type": "boolean",
            "description": "Whether the transaction can be retried.\n\n`true` \u2014 retry is allowed, you can call this API again for failed transactions.\n`false` \u2014 retry is not allowed (e.g., due to validation errors that must be fixed first).",
            "example": false
          },
          "responseCode": {
            "type": "string",
            "description": "Response code returned by NeSL.\n\n**Example:** `\"ER00J44\"` (Invalid First Party Name).",
            "example": "ER00J44"
          },
          "responseDescription": {
            "type": "string",
            "description": "Human-readable description of the NeSL response code.",
            "example": "Invalid First Party Name"
          },
          "retryStatus": {
            "type": "string",
            "description": "Outcome of the retry attempt.",
            "enum": [
              "SUCCESS",
              "FAILED"
            ],
            "example": "FAILED"
          }
        },
        "title": "NeslRetryData"
      },
      "NeslNotificationListApiResponse": {
        "type": "object",
        "description": "Response wrapper for the List eBG Notifications API.\n\nOn success (`status: 1`), `data` contains the notification list and total count.",
        "properties": {
          "status": {
            "type": "integer",
            "description": "API response status.\n\n`1` = success, `0` = failure.",
            "example": 1,
            "enum": [
              0,
              1
            ]
          },
          "messages": {
            "type": "array",
            "description": "Array of response messages. Empty array `[]` on success.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "data": {
            "$ref": "#/components/schemas/NeslNotificationListData"
          }
        },
        "title": "NeslNotificationListApiResponse"
      },
      "NeslNotificationListData": {
        "type": "object",
        "description": "Contains the list of eBG notifications and the total count.",
        "properties": {
          "notificationList": {
            "type": "array",
            "description": "Array of eBG notification objects.",
            "items": {
              "$ref": "#/components/schemas/NeslNotificationItem"
            }
          },
          "totalCount": {
            "type": "integer",
            "description": "Total number of notification records matching the query. Use with `max` and `offset` for pagination.",
            "example": 5
          }
        },
        "title": "NeslNotificationListData"
      },
      "NeslNotificationItem": {
        "type": "object",
        "description": "Details of a single NeSL eBG event notification.",
        "properties": {
          "eventType": {
            "type": "string",
            "description": "Type of the eBG event.\n\n**Possible values:** `Amendment`, `Renewal`, `Extend_or_pay`, `Cancellation`, `Closure`, `Partial_invocation`, `Invocation`.",
            "example": "Invocation"
          },
          "lastUpdated": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the most recent update to the notification.\n\n**Format:** ISO 8601 (e.g., `\"2025-08-24T14:15:22Z\"`).",
            "example": "2025-08-24T14:15:22Z"
          },
          "loanNo": {
            "type": "string",
            "description": "Loan number associated with the eBG notification.",
            "example": "LOAN001"
          },
          "notifTxnId": {
            "type": "string",
            "description": "Unique notification transaction ID.",
            "example": "NTX12345"
          },
          "requestId": {
            "type": "string",
            "description": "Request ID associated with the eBG notification.",
            "example": "REQ001"
          },
          "reviewedBy": {
            "type": "string",
            "description": "Name of the user who reviewed the notification. Empty or null if not yet reviewed.",
            "example": "John Doe"
          },
          "status": {
            "type": "string",
            "description": "Review status of the notification.\n\n**Possible values:** `Accepted`, `Rejected`, `Pending`.",
            "example": "Pending"
          }
        },
        "title": "NeslNotificationItem"
      },
      "NeslNotificationDetailApiResponse": {
        "type": "object",
        "description": "Response object for the Get eBG notification detail API.",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/NeslNotificationDetailData"
          },
          "messages": {
            "type": "array",
            "description": "Additional response messages, if any.",
            "items": {
              "$ref": "#/components/schemas/Message"
            }
          },
          "status": {
            "type": "integer",
            "description": "API status code.\n\n**Possible values:**\n- `1` \u2014 Success\n- `0` \u2014 Failure",
            "example": 1
          }
        },
        "title": "NeslNotificationDetailApiResponse"
      },
      "NeslNotificationDetailData": {
        "type": "object",
        "description": "Wrapper object containing the notification details.",
        "properties": {
          "notificationDetails": {
            "$ref": "#/components/schemas/NeslNotificationDetails"
          }
        },
        "title": "NeslNotificationDetailData"
      },
      "NeslNotificationDetails": {
        "type": "object",
        "description": "Complete details of a single NeSL eBG notification event.",
        "properties": {
          "canReview": {
            "type": "boolean",
            "description": "Indicates whether the notification can be reviewed."
          },
          "loanDetails": {
            "type": "array",
            "description": "Contains details of the loan associated with the notification.",
            "items": {
              "$ref": "#/components/schemas/NeslNotificationLoanDetail"
            }
          },
          "neslTxnId": {
            "type": "string",
            "nullable": true,
            "description": "Transaction ID assigned by NeSL."
          },
          "notifTxnId": {
            "type": "string",
            "description": "Unique notification transaction ID."
          },
          "participantDetails": {
            "type": "array",
            "description": "List of associated participants.",
            "items": {
              "$ref": "#/components/schemas/NeslNotificationParticipant"
            }
          },
          "portalId": {
            "type": "string",
            "nullable": true,
            "description": "Portal ID assigned to the creditor by NeSL."
          },
          "rejected": {
            "type": "boolean",
            "description": "Indicates if the notification request was rejected."
          },
          "requestDetails": {
            "$ref": "#/components/schemas/NeslNotificationRequestDetails"
          },
          "reviewRemarks": {
            "type": "string",
            "description": "Remarks provided during review."
          },
          "reviewedBy": {
            "type": "string",
            "description": "Name of the reviewer."
          },
          "reviewedDate": {
            "type": "string",
            "format": "date-time",
            "description": "Date when the review was completed.\n\n**Format:** ISO 8601 (e.g., `\"2025-08-24T14:15:22Z\"`)."
          },
          "status": {
            "type": "string",
            "description": "Status of the notification.\n\n**Possible values:** `Accepted`, `Rejected`."
          },
          "timestamp": {
            "type": "string",
            "nullable": true,
            "description": "Timestamp of the notification (if available)."
          }
        },
        "title": "NeslNotificationDetails"
      },
      "NeslNotificationLoanDetail": {
        "type": "object",
        "description": "Loan details associated with an eBG notification.",
        "properties": {
          "claimExpiryDate": {
            "type": "string",
            "format": "date",
            "description": "Claim expiry date of the eBG.\n\n**Format:** `YYYY-MM-DD`."
          },
          "contractRefNo": {
            "type": "string",
            "description": "Contract reference number."
          },
          "creditSubtype": {
            "type": "string",
            "description": "Credit subtype of the loan."
          },
          "currencyOfDebt": {
            "type": "string",
            "description": "Currency of the debt (e.g., `INR`)."
          },
          "event": {
            "type": "string",
            "description": "eBG event type.\n\n**Possible values:** `INVOCATION`, `AMENDMENT`, `CANCELLATION`, `RENEWAL`, `CLOSURE`, `PARTIAL_INVOCATION`, `ISSUANCE`."
          },
          "expiryDate": {
            "type": "string",
            "format": "date",
            "description": "Expiry date of the eBG.\n\n**Format:** `YYYY-MM-DD`."
          },
          "loanNumber": {
            "type": "string",
            "description": "Loan number associated with the eBG."
          },
          "loanRemark": {
            "type": "string",
            "description": "Remarks related to the loan."
          },
          "sanctionAmount": {
            "type": "string",
            "description": "Sanctioned amount."
          },
          "sanctionCurrency": {
            "type": "string",
            "description": "Currency of the sanction (e.g., `INR`)."
          },
          "totalOutstandingAmount": {
            "type": "string",
            "description": "Total outstanding amount."
          },
          "vendorCode": {
            "type": "string",
            "description": "Vendor code."
          }
        },
        "title": "NeslNotificationLoanDetail"
      },
      "NeslNotificationParticipant": {
        "type": "object",
        "description": "Participant details associated with an eBG notification.",
        "properties": {
          "businessUnit": {
            "type": "string",
            "nullable": true,
            "description": "Business unit of the participant."
          },
          "contactRelation": {
            "type": "string",
            "description": "Relationship of the participant.\n\n**Possible values:** `Beneficiary`, `Creditor`, `Debtor`."
          },
          "fullName": {
            "type": "string",
            "description": "Full name of the participant."
          },
          "officialDocId": {
            "type": "string",
            "description": "Official document ID of the participant (e.g., PAN number)."
          },
          "officialDocType": {
            "type": "string",
            "description": "Type of official document (e.g., `PAN card`)."
          }
        },
        "title": "NeslNotificationParticipant"
      },
      "NeslNotificationRequestDetails": {
        "type": "object",
        "description": "Details of the request that triggered the eBG notification.",
        "properties": {
          "accountHolderName": {
            "type": "string",
            "nullable": true,
            "description": "Name of the account holder."
          },
          "accountNumber": {
            "type": "string",
            "nullable": true,
            "description": "Account number."
          },
          "bankName": {
            "type": "string",
            "nullable": true,
            "description": "Name of the bank."
          },
          "contactMobile": {
            "type": "string",
            "nullable": true,
            "description": "Contact number."
          },
          "contactPersonName": {
            "type": "string",
            "nullable": true,
            "description": "Full name of the contact person of the party."
          },
          "department": {
            "type": "string",
            "nullable": true,
            "description": "Department."
          },
          "emailId": {
            "type": "string",
            "nullable": true,
            "description": "Email address."
          },
          "entityName": {
            "type": "string",
            "description": "Name of the requesting entity."
          },
          "extensionPeriod": {
            "type": "string",
            "nullable": true,
            "description": "Extension period."
          },
          "ifscCode": {
            "type": "string",
            "nullable": true,
            "description": "IFSC code."
          },
          "invocationAmount": {
            "type": "string",
            "nullable": true,
            "description": "Invocation amount."
          },
          "requesRemarks": {
            "type": "string",
            "description": "Remarks provided in the request."
          },
          "requestDate": {
            "type": "string",
            "description": "Date and time when the request was made."
          },
          "requestId": {
            "type": "string",
            "description": "Unique identifier for the request."
          },
          "requestSource": {
            "type": "string",
            "description": "Source of the request (e.g., `NeSLPortal`)."
          },
          "requestType": {
            "type": "string",
            "description": "Type of request.\n\n**Possible values:** `AMENDMENT`, `RENEWAL`, `EXTEND_OR_PAY`, `CANCELLATION`, `CLOSURE`, `PARTIAL_INVOCATION`, `INVOCATION`."
          },
          "requestorRelationship": {
            "type": "string",
            "description": "Relationship of the requester to the debt."
          },
          "supportingDoc": {
            "type": "string",
            "description": "Path to the supporting document."
          },
          "userName": {
            "type": "string",
            "description": "Name of the user who initiated the request."
          }
        },
        "title": "NeslNotificationRequestDetails"
      },
      "NeslNotificationReviewRequest": {
        "type": "object",
        "description": "Request body for reviewing an eBG event notification.",
        "properties": {
          "data": {
            "type": "object",
            "description": "Review details for the eBG notification.",
            "properties": {
              "requestId": {
                "type": "string",
                "description": "Unique identifier for the request."
              },
              "loanNumber": {
                "type": "string",
                "description": "The loan number associated with the eBG notification."
              },
              "reviewStatus": {
                "type": "string",
                "description": "Status of the review.",
                "enum": [
                  "Accepted",
                  "Rejected"
                ]
              },
              "reviewRemarks": {
                "type": "string",
                "description": "Remarks or comments provided during the review."
              },
              "notifTxnId": {
                "type": "string",
                "description": "Unique transaction ID of the notification to be reviewed."
              }
            }
          }
        },
        "title": "NeslNotificationReviewRequest"
      },
      "NeslNotificationReviewApiResponse": {
        "type": "object",
        "description": "Response for the Review eBG Notification API.",
        "properties": {
          "data": {
            "type": "object",
            "description": "Response data object. Empty on success."
          },
          "messages": {
            "type": "array",
            "description": "Contains details about the response message.",
            "items": {
              "type": "object",
              "required": [
                "code",
                "message"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Response code.",
                  "example": "ebg.notification.review.success"
                },
                "message": {
                  "type": "string",
                  "description": "Review confirmation message.",
                  "example": "eBG notification review success."
                }
              }
            }
          },
          "status": {
            "type": "integer",
            "description": "Indicates API response status. `1` means success.",
            "example": 1
          }
        },
        "title": "NeslNotificationReviewApiResponse"
      },
      "CoordinatePickerWebhookPayload": {
        "type": "object",
        "title": "CoordinatePickerWebhookPayload",
        "properties": {
          "documentId": {
            "type": "string",
            "description": "The unique Leegality document ID for the eSigning request.",
            "example": "01KJ4SVYM95J35XVVJAXDPA7JW"
          },
          "irn": {
            "type": "string",
            "nullable": true,
            "description": "The Internal Reference Number passed in the original eSigning request. Returns `null` if no IRN was provided.",
            "example": "123456"
          },
          "mac": {
            "type": "string",
            "description": "HMAC-SHA1 hash of the `documentId` computed with your Private Salt. Use this to verify the webhook is genuinely from Leegality.",
            "example": "a9cb19205a780900d33acef52cbf86ae04b3023c"
          },
          "invitations": {
            "type": "array",
            "description": "Array of invitee objects for this document. Each object represents one invitee with their updated signing URL and status after coordinate placement.",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "The full name of the invitee.",
                  "example": "John Doe"
                },
                "email": {
                  "type": "string",
                  "description": "The email address of the invitee.",
                  "example": "john@example.com"
                },
                "phone": {
                  "type": "string",
                  "nullable": true,
                  "description": "The phone number of the invitee.",
                  "example": "9876543210"
                },
                "signUrl": {
                  "type": "string",
                  "description": "The unique signing URL for this invitee, generated after coordinate placement. Share this URL with the invitee to proceed to signing.",
                  "example": "https://app1.leegality.com/sign/uuid-here"
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether this invitation is currently active.",
                  "example": true
                },
                "expiryDate": {
                  "type": "string",
                  "description": "The expiry date and time of the invitation.",
                  "example": "07-03-2026 23:59:59"
                }
              }
            }
          }
        }
      },
      "SignerSignsDocumentPayload": {
        "type": "object",
        "title": "SignerSignsDocumentPayload",
        "properties": {
          "webhookType": {
            "type": "string",
            "description": "Indicates whether this is a success or error event.",
            "enum": [
              "Success",
              "Error"
            ],
            "example": "Success"
          },
          "documentId": {
            "type": "string",
            "description": "The unique Leegality document ID. Use with the [Details API](/document-execution/api/check-document-details) to fetch full document information.",
            "example": "01KMFEE9T8WPY0WPWXQHQ7DTJ2"
          },
          "documentStatus": {
            "type": "string",
            "description": "The document's status at the time of this event.\n- `\"Sent\"` \u2014 one or more invitees are still pending.\n- `\"Completed\"` \u2014 all invitees have acted.",
            "enum": [
              "Draft",
              "Sent",
              "Completed"
            ],
            "example": "Sent"
          },
          "irn": {
            "type": "string",
            "nullable": true,
            "description": "Internal Reference Number from the original eSigning request.",
            "example": null
          },
          "mac": {
            "type": "string",
            "description": "HMAC-SHA1 of `documentId` using your Private Salt. Use to [verify the webhook](/document-execution/api/webhooks/verify-webhook-request).",
            "example": "6b736eb163fba3983a0348bc05ffad62a6cbaea1"
          },
          "messages": {
            "type": "array",
            "description": "An array of event messages.",
            "example": []
          },
          "verification": {
            "type": "object",
            "nullable": true,
            "description": "Certificate verification results. Present as an object when verification is configured, regardless of outcome.\n\n- **No verification configured** \u2014 all fields are `null`.\n- **Verification configured** \u2014 each field is `true` (match), `false` (mismatch), or `null` (that field not configured). `smartName` is an integer (0\u2013100).\n\nIf the department is set to **\"Reject if failed\"**, a mismatch triggers the [Certificate Verification Failed](/document-execution/api/certificate-verification-failed) event instead. If set to **\"Accept but show results\"**, signing proceeds and results appear here.",
            "properties": {
              "name": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's name matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": null
              },
              "smartName": {
                "type": "integer",
                "nullable": true,
                "description": "Name similarity score against the certificate (0\u2013100). `0` = no match, `100` = exact match. `null` if not configured.",
                "example": null
              },
              "pincode": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's pincode matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": null
              },
              "state": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's state matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": null
              },
              "title": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's title matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": null
              },
              "yob": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's year of birth matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": null
              },
              "gender": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's gender matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": null
              }
            }
          },
          "request": {
            "type": "object",
            "description": "Details about the invitee associated with this webhook event.",
            "properties": {
              "inviteeType": {
                "type": "string",
                "description": "The role of the invitee in the workflow.",
                "enum": [
                  "Signer"
                ],
                "example": "Signer"
              },
              "name": {
                "type": "string",
                "description": "The full name of the invitee.",
                "example": "Abhishek Sharma"
              },
              "email": {
                "type": "string",
                "description": "The email address of the invitee.",
                "example": "abhishek@example.com"
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "The phone number of the invitee.",
                "example": null
              },
              "invitationUrl": {
                "type": "string",
                "description": "The URL for this invitee to sign or review the document.",
                "example": "https://sandbox.leegality.com/sign/uuid-here"
              },
              "active": {
                "type": "boolean",
                "description": "Indicates whether it is this invitee's turn to act in the signing sequence.",
                "example": true
              },
              "action": {
                "type": "string",
                "description": "The action taken by the invitee.",
                "enum": [
                  "Signed"
                ],
                "example": "Signed"
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message for this event.",
                "example": null
              },
              "expired": {
                "type": "boolean",
                "description": "Indicates whether the invitation has been terminated.",
                "example": false
              },
              "expiryDate": {
                "type": "string",
                "description": "The date and time the invitation is configured to expire. Format: `dd-MM-yyyy HH:mm:ss`.",
                "example": "03-04-2026 23:59:59"
              },
              "rejectionMessage": {
                "type": "string",
                "nullable": true,
                "description": "The rejection reason provided by the invitee.",
                "example": null
              },
              "signType": {
                "type": "string",
                "nullable": true,
                "description": "The signature method used.\n- `AADHAAR`\n- `VIRTUAL_SIGN`\n- `QUICK_SIGN`\n- `DSC`\n- `NESL_SIGN`\n- `OFFLINE_SIGN`\n- `DOC_SIGNER`\n- `AUTOMATED_SIGN`",
                "enum": [
                  "AADHAAR",
                  "VIRTUAL_SIGN",
                  "QUICK_SIGN",
                  "DSC",
                  "NESL_SIGN",
                  "OFFLINE_SIGN",
                  "DOC_SIGNER",
                  "AUTOMATED_SIGN"
                ],
                "example": "AADHAAR"
              }
            }
          }
        }
      },
      "ReviewerApprovesDocumentPayload": {
        "type": "object",
        "title": "ReviewerApprovesDocumentPayload",
        "properties": {
          "webhookType": {
            "type": "string",
            "description": "Indicates whether this is a success or error event.",
            "enum": [
              "Success",
              "Error"
            ],
            "example": "Success"
          },
          "documentId": {
            "type": "string",
            "description": "The unique Leegality document ID. Use with the [Details API](/document-execution/api/check-document-details) to fetch full document information.",
            "example": "01KMFEE9T8WPY0WPWXQHQ7DTJ2"
          },
          "documentStatus": {
            "type": "string",
            "description": "The document's status at the time of this event.\n- `\"Sent\"` \u2014 one or more invitees are still pending.\n- `\"Completed\"` \u2014 all invitees have acted.",
            "enum": [
              "Draft",
              "Sent",
              "Completed"
            ],
            "example": "Sent"
          },
          "irn": {
            "type": "string",
            "nullable": true,
            "description": "Internal Reference Number from the original eSigning request.",
            "example": null
          },
          "mac": {
            "type": "string",
            "description": "HMAC-SHA1 of `documentId` using your Private Salt. Use to [verify the webhook](/document-execution/api/webhooks/verify-webhook-request).",
            "example": "6b736eb163fba3983a0348bc05ffad62a6cbaea1"
          },
          "messages": {
            "type": "array",
            "description": "An array of event messages.",
            "example": []
          },
          "verification": {
            "type": "object",
            "nullable": true,
            "description": "Certificate verification results. Not applicable to approvers.",
            "example": null
          },
          "request": {
            "type": "object",
            "description": "Details about the invitee associated with this webhook event.",
            "properties": {
              "inviteeType": {
                "type": "string",
                "description": "The role of the invitee in the workflow.",
                "enum": [
                  "Approver"
                ],
                "example": "Approver"
              },
              "name": {
                "type": "string",
                "description": "The full name of the invitee.",
                "example": "Abhishek Sharma"
              },
              "email": {
                "type": "string",
                "description": "The email address of the invitee.",
                "example": "abhishek@example.com"
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "The phone number of the invitee.",
                "example": null
              },
              "invitationUrl": {
                "type": "string",
                "description": "The URL for this invitee to sign or review the document.",
                "example": "https://sandbox.leegality.com/sign/52b44c7d-803a-4bc2-adb7-efa58ce45fce"
              },
              "active": {
                "type": "boolean",
                "description": "Indicates whether it is this invitee's turn to act in the signing sequence.",
                "example": true
              },
              "action": {
                "type": "string",
                "description": "The action taken by the invitee.",
                "enum": [
                  "APPROVED"
                ],
                "example": "APPROVED"
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message for this event.",
                "example": null
              },
              "expired": {
                "type": "boolean",
                "description": "Indicates whether the invitation has been terminated.",
                "example": false
              },
              "expiryDate": {
                "type": "string",
                "description": "The date and time the invitation is configured to expire. Format: `dd-MM-yyyy HH:mm:ss`.",
                "example": "03-04-2026 23:59:59"
              },
              "rejectionMessage": {
                "type": "string",
                "nullable": true,
                "description": "The rejection reason provided by the invitee.",
                "example": null
              },
              "signType": {
                "type": "string",
                "nullable": true,
                "description": "The signature method used.",
                "enum": [
                  null
                ],
                "example": null
              }
            }
          }
        }
      },
      "SignerRejectsDocumentPayload": {
        "type": "object",
        "title": "SignerRejectsDocumentPayload",
        "properties": {
          "webhookType": {
            "type": "string",
            "description": "Indicates whether this is a success or error event.",
            "enum": [
              "Success",
              "Error"
            ],
            "example": "Error"
          },
          "documentId": {
            "type": "string",
            "description": "The unique Leegality document ID. Use with the [Details API](/document-execution/api/check-document-details) to fetch full document information.",
            "example": "01KMFPEMC6907ERY22NBBMEEHA"
          },
          "documentStatus": {
            "type": "string",
            "description": "The document's status at the time of this event.\n- `\"Sent\"` \u2014 one or more invitees are still pending.\n- `\"Completed\"` \u2014 all invitees have acted.",
            "enum": [
              "Draft",
              "Sent",
              "Completed"
            ],
            "example": "Sent"
          },
          "irn": {
            "type": "string",
            "nullable": true,
            "description": "Internal Reference Number from the original eSigning request.",
            "example": null
          },
          "mac": {
            "type": "string",
            "description": "HMAC-SHA1 of `documentId` using your Private Salt. Use to [verify the webhook](/document-execution/api/webhooks/verify-webhook-request).",
            "example": "7e70aaef3f77eb72d3df19c4411e2d397c48c173"
          },
          "messages": {
            "type": "array",
            "description": "An array of event messages.",
            "example": []
          },
          "verification": {
            "type": "object",
            "nullable": true,
            "description": "Certificate verification results. Not applicable to rejection events.",
            "example": null
          },
          "request": {
            "type": "object",
            "description": "Details about the invitee associated with this webhook event.",
            "properties": {
              "inviteeType": {
                "type": "string",
                "description": "The role of the invitee in the workflow.",
                "enum": [
                  "Signer"
                ],
                "example": "Signer"
              },
              "name": {
                "type": "string",
                "description": "The full name of the invitee.",
                "example": "Abhishek Sharma"
              },
              "email": {
                "type": "string",
                "description": "The email address of the invitee.",
                "example": "abhishek@example.com"
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "The phone number of the invitee.",
                "example": null
              },
              "invitationUrl": {
                "type": "string",
                "description": "The URL for this invitee to sign or review the document.",
                "example": "https://sandbox.leegality.com/sign/3990a31a-19fa-48f3-b032-e45b6edd836d"
              },
              "active": {
                "type": "boolean",
                "description": "Indicates whether it is this invitee's turn to act in the signing sequence.",
                "example": true
              },
              "action": {
                "type": "string",
                "description": "The action taken by the invitee.",
                "enum": [
                  "Rejected"
                ],
                "example": "Rejected"
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message for this event.",
                "example": "Invitation rejected by the signer."
              },
              "expired": {
                "type": "boolean",
                "description": "Indicates whether the invitation has been terminated.",
                "example": false
              },
              "expiryDate": {
                "type": "string",
                "description": "The date and time the invitation is configured to expire. Format: `dd-MM-yyyy HH:mm:ss`.",
                "example": "03-04-2026 23:59:59"
              },
              "rejectionMessage": {
                "type": "string",
                "nullable": true,
                "description": "The rejection reason provided by the signer. Retrieve the signer's reason via the [Details API](/document-execution/api/check-document-details) using `invitations_invitationStatus_signRejectionMessage`.",
                "example": null
              },
              "signType": {
                "type": "string",
                "nullable": true,
                "description": "The signature method used.",
                "enum": [
                  null
                ],
                "example": null
              }
            }
          }
        }
      },
      "ReviewerRejectsDocumentPayload": {
        "type": "object",
        "title": "ReviewerRejectsDocumentPayload",
        "properties": {
          "webhookType": {
            "type": "string",
            "description": "Indicates whether this is a success or error event.",
            "enum": [
              "Success"
            ],
            "example": "Success"
          },
          "documentId": {
            "type": "string",
            "description": "The unique Leegality document ID. Use with the [Details API](/document-execution/api/check-document-details) to fetch full document information.",
            "example": "01KGPHV8D39W733W3QBGD5P7SC"
          },
          "documentStatus": {
            "type": "string",
            "description": "The document's status at the time of this event.\n- `\"Sent\"` \u2014 one or more invitees are still pending.\n- `\"Completed\"` \u2014 all invitees have acted.",
            "enum": [
              "Draft",
              "Sent",
              "Completed"
            ],
            "example": "Sent"
          },
          "irn": {
            "type": "string",
            "nullable": true,
            "description": "Internal Reference Number from the original eSigning request.",
            "example": null
          },
          "mac": {
            "type": "string",
            "description": "HMAC-SHA1 of `documentId` using your Private Salt. Use to [verify the webhook](/document-execution/api/webhooks/verify-webhook-request).",
            "example": "c1515dd8d930a5accd7934d342cc069b23241b23"
          },
          "messages": {
            "type": "array",
            "description": "An array of event messages.",
            "example": []
          },
          "verification": {
            "type": "object",
            "nullable": true,
            "description": "Certificate verification results. Not applicable to approvers.",
            "example": null
          },
          "request": {
            "type": "object",
            "description": "Details about the invitee associated with this webhook event.",
            "properties": {
              "inviteeType": {
                "type": "string",
                "description": "The role of the invitee in the workflow.",
                "enum": [
                  "Approver"
                ],
                "example": "Approver"
              },
              "name": {
                "type": "string",
                "description": "The full name of the invitee.",
                "example": "Abhishek 2nd User"
              },
              "email": {
                "type": "string",
                "description": "The email address of the invitee.",
                "example": "abhishek@example.com"
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "The phone number of the invitee.",
                "example": null
              },
              "invitationUrl": {
                "type": "string",
                "description": "The URL for this invitee to sign or review the document.",
                "example": "https://sandbox.leegality.com/sign/ee111a86-5f6d-40e7-9a53-d73bfa939473"
              },
              "active": {
                "type": "boolean",
                "description": "Indicates whether it is this invitee's turn to act in the signing sequence.",
                "example": true
              },
              "action": {
                "type": "string",
                "description": "The action taken by the invitee.",
                "enum": [
                  "REJECTED"
                ],
                "example": "REJECTED"
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message for this event.",
                "example": null
              },
              "expired": {
                "type": "boolean",
                "description": "Indicates whether the invitation has been terminated.",
                "example": false
              },
              "expiryDate": {
                "type": "string",
                "description": "The date and time the invitation is configured to expire. Format: `dd-MM-yyyy HH:mm:ss`.",
                "example": "03-04-2026 23:59:59"
              },
              "rejectionMessage": {
                "type": "string",
                "nullable": true,
                "description": "The rejection reason provided by the reviewer.",
                "example": "Document requires amendments before approval."
              },
              "signType": {
                "type": "string",
                "nullable": true,
                "description": "The signature method used.",
                "enum": [
                  null
                ],
                "example": null
              }
            }
          }
        }
      },
      "CertificateVerificationFailedPayload": {
        "type": "object",
        "title": "CertificateVerificationFailedPayload",
        "properties": {
          "webhookType": {
            "type": "string",
            "description": "Indicates whether this is a success or error event.",
            "enum": [
              "Error"
            ],
            "example": "Error"
          },
          "documentId": {
            "type": "string",
            "description": "The unique Leegality document ID. Use with the [Details API](/document-execution/api/check-document-details) to fetch full document information.",
            "example": "01KFJ9KFSSFV9E97DHM2QTFQJ2"
          },
          "documentStatus": {
            "type": "string",
            "description": "The document's status at the time of this event.\n- `\"Sent\"` \u2014 one or more invitees are still pending.\n- `\"Completed\"` \u2014 all invitees have acted.",
            "enum": [
              "Draft",
              "Sent",
              "Completed"
            ],
            "example": "Sent"
          },
          "irn": {
            "type": "string",
            "nullable": true,
            "description": "Internal Reference Number from the original eSigning request.",
            "example": null
          },
          "mac": {
            "type": "string",
            "description": "HMAC-SHA1 of `documentId` using your Private Salt. Use to [verify the webhook](/document-execution/api/webhooks/verify-webhook-request).",
            "example": "b10862af9e05e194e6c6455fc839706ec5c8d554"
          },
          "messages": {
            "type": "array",
            "description": "An array of event messages. One entry per failed verification field.",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Machine-readable verification failure code.\n- `name.verification.failed`\n- `smartname.verification.failed`\n- `pincode.verification.failed`\n- `state.verification.failed`\n- `title.verification.failed`\n- `yob.verification.failed`\n- `gender.verification.failed`",
                  "example": "name.verification.failed"
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable description of the failure.\n- `Name doesn't match with the Digital Signature Certificate. Document not signed.`\n- `Name (Smart Verification) doesn't match with the Digital Signature Certificate. Document not signed.`\n- `Pincode doesn't match with the Digital Signature Certificate. Document not signed.`\n- `State doesn't match with the Digital Signature Certificate. Document not signed.`\n- `Title doesn't match with the Digital Signature Certificate. Document not signed.`\n- `Year of birth doesn't match with the Digital Signature Certificate. Document not signed.`\n- `Gender doesn't match with the Digital Signature Certificate. Document not signed.`",
                  "example": "Name doesn't match with the Digital Signature Certificate. Document not signed."
                }
              }
            }
          },
          "verification": {
            "type": "object",
            "nullable": true,
            "description": "Certificate verification results for each configured field.",
            "properties": {
              "name": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's name matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": false
              },
              "smartName": {
                "type": "integer",
                "nullable": true,
                "description": "Name similarity score against the certificate (0\u2013100). `0` = no match, `100` = exact match. `null` if not configured.",
                "example": 0
              },
              "pincode": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's pincode matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": false
              },
              "state": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's state matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": false
              },
              "title": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's title matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": false
              },
              "yob": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's year of birth matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": false
              },
              "gender": {
                "type": "boolean",
                "nullable": true,
                "description": "Whether the invitee's gender matched the certificate.\n- `true` \u2014 match\n- `false` \u2014 mismatch\n- `null` \u2014 not configured",
                "example": false
              }
            }
          },
          "request": {
            "type": "object",
            "description": "Details about the invitee associated with this webhook event.",
            "properties": {
              "inviteeType": {
                "type": "string",
                "description": "The role of the invitee in the workflow.",
                "enum": [
                  "Signer"
                ],
                "example": "Signer"
              },
              "name": {
                "type": "string",
                "description": "The full name of the invitee.",
                "example": "John Doe"
              },
              "email": {
                "type": "string",
                "description": "The email address of the invitee.",
                "example": "abhishek@example.com"
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "The phone number of the invitee.",
                "example": null
              },
              "invitationUrl": {
                "type": "string",
                "description": "The URL for this invitee to sign or review the document.",
                "example": "https://sandbox.leegality.com/sign/2e4ace49-85bd-4dc6-86f9-c41242c35910"
              },
              "active": {
                "type": "boolean",
                "description": "Indicates whether it is this invitee's turn to act in the signing sequence.",
                "example": true
              },
              "action": {
                "type": "string",
                "nullable": true,
                "description": "The action taken by the invitee.",
                "enum": [
                  null
                ],
                "example": null
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message for this event.",
                "example": "Verification details doesn't match with the Digital Signature Certificate. Document not signed."
              },
              "expired": {
                "type": "boolean",
                "description": "Indicates whether the invitation has been terminated. Can be reactivated from the Leegality dashboard.",
                "example": true
              },
              "expiryDate": {
                "type": "string",
                "description": "The date and time the invitation is configured to expire. Format: `dd-MM-yyyy HH:mm:ss`.",
                "example": "03-04-2026 23:59:59"
              },
              "rejectionMessage": {
                "type": "string",
                "nullable": true,
                "description": "The rejection reason provided by the invitee.",
                "example": null
              },
              "signType": {
                "type": "string",
                "nullable": true,
                "description": "The signature method used.",
                "enum": [
                  null
                ],
                "example": null
              }
            }
          }
        }
      },
      "InvitationExpiredPayload": {
        "type": "object",
        "title": "InvitationExpiredPayload",
        "properties": {
          "webhookType": {
            "type": "string",
            "description": "Indicates whether this is a success or error event.",
            "enum": [
              "Error"
            ],
            "example": "Error"
          },
          "documentId": {
            "type": "string",
            "description": "The unique Leegality document ID. Use with the [Details API](/document-execution/api/check-document-details) to fetch full document information.",
            "example": "01KC8ZWZ7ZWNAFTZRYMYMWV84B"
          },
          "documentStatus": {
            "type": "string",
            "description": "The document's status at the time of this event.\n- `\"Sent\"` \u2014 one or more invitees are still pending.\n- `\"Completed\"` \u2014 all invitees have acted.",
            "enum": [
              "Draft",
              "Sent",
              "Completed"
            ],
            "example": "Sent"
          },
          "irn": {
            "type": "string",
            "nullable": true,
            "description": "Internal Reference Number from the original eSigning request.",
            "example": null
          },
          "mac": {
            "type": "string",
            "description": "HMAC-SHA1 of `documentId` using your Private Salt. Use to [verify the webhook](/document-execution/api/webhooks/verify-webhook-request).",
            "example": "9fc04ef2ce66849096b6c8e393f557794ddd61ac"
          },
          "messages": {
            "type": "array",
            "description": "An array of event messages.",
            "example": []
          },
          "verification": {
            "type": "object",
            "nullable": true,
            "description": "Certificate verification results.",
            "example": null
          },
          "request": {
            "type": "object",
            "description": "Details about the invitee associated with this webhook event.",
            "properties": {
              "inviteeType": {
                "type": "string",
                "description": "The role of the invitee in the workflow.",
                "example": "Signer"
              },
              "name": {
                "type": "string",
                "description": "The full name of the invitee.",
                "example": "Abhishek 2nd User"
              },
              "email": {
                "type": "string",
                "description": "The email address of the invitee.",
                "example": "abhishek@example.com"
              },
              "phone": {
                "type": "string",
                "nullable": true,
                "description": "The phone number of the invitee.",
                "example": null
              },
              "invitationUrl": {
                "type": "string",
                "description": "The URL for this invitee to sign or review the document.",
                "example": "https://sandbox.leegality.com/sign/1e330008-e8e6-46b2-8564-d55f906bfd24"
              },
              "active": {
                "type": "boolean",
                "description": "Indicates whether it is this invitee's turn to act in the signing sequence.",
                "example": true
              },
              "action": {
                "type": "string",
                "nullable": true,
                "description": "The action taken by the invitee.",
                "enum": [
                  null
                ],
                "example": null
              },
              "error": {
                "type": "string",
                "nullable": true,
                "description": "Error message for this event.",
                "example": "Transaction timed out."
              },
              "expired": {
                "type": "boolean",
                "description": "Indicates whether the invitation has been terminated.",
                "example": true
              },
              "expiryDate": {
                "type": "string",
                "nullable": true,
                "description": "The date and time the invitation is configured to expire. Format: `dd-MM-yyyy HH:mm:ss`.",
                "example": null
              },
              "rejectionMessage": {
                "type": "string",
                "nullable": true,
                "description": "The rejection reason provided by the invitee.",
                "example": null
              },
              "signType": {
                "type": "string",
                "nullable": true,
                "description": "The signature method used.",
                "enum": [
                  null
                ],
                "example": null
              }
            }
          }
        }
      },
      "gpsConfigResponse": {
        "type": "object",
        "description": "GPS location restriction and accuracy configuration set by the sender for this invitee.",
        "properties": {
          "applyLocationRestriction": {
            "type": "boolean",
            "description": "`true` indicates location-based signing restriction is enabled for this invitee. The invitee can only sign from within the area defined by `allowedLatitude`, `allowedLongitude`, and `permissibleRadius`."
          },
          "allowedLatitude": {
            "type": "number",
            "description": "Latitude of the permitted signing location configured by the sender.",
            "example": 28.50950813247034
          },
          "allowedLongitude": {
            "type": "number",
            "description": "Longitude of the permitted signing location configured by the sender.",
            "example": 77.08920288142689
          },
          "permissibleRadius": {
            "type": "integer",
            "description": "Radius (in meters) around the permitted location within which the invitee is allowed to sign.",
            "example": 5000
          },
          "applyLocationAccuracy": {
            "type": "boolean",
            "description": "`true` indicates GPS accuracy validation is enabled. The invitee's device GPS accuracy must meet the `accuracyThreshold` to proceed with signing."
          },
          "accuracyThreshold": {
            "type": "integer",
            "description": "Maximum allowed GPS accuracy in meters configured by the sender. Signing is blocked if the invitee's device accuracy exceeds this value.",
            "example": 10000
          }
        }
      }
    }
  }
}