Skip to main content
POST
/
esign
/
generate
Generate E-Sign request
curl --request POST \
  --url https://bgv.konnectnxt.com/api/esign/generate/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "file_name": "offer_letter.pdf",
  "file_base64": "JVBERi0xLjcKCjQgMCBvYmoKPDwKL0JpdHNQZXJDb21wb25lbnQgOAov...",
  "status_callback_url": "https://yourcompany.com/callback",
  "invitees": [
    {
      "esigner_name": "John Doe",
      "esigner_email": "john@example.com",
      "esigner_phone": "9874563210"
    },
    {
      "esigner_name": "Alice",
      "esigner_email": "alice@example.com",
      "esigner_phone": "8974521532"
    }
  ]
}
'
{
  "code": 201,
  "status": "success",
  "message": "E-Sign link generated successfully and sent to signer's email and phone.",
  "data": {
    "request_id": "53ecfa78-2bb0-48a0-a4f3-d1caa1e79b35",
    "esign_doc_id": "01KH6407707YBFWJ642WRWC5D3",
    "esign_url": "https://app1.leegality.com/sign/241d83bd-56df-49c6-8635-97c2c7bfde78",
    "expires_at": "2026-02-21T18:29:59Z"
  }
}

Invitees

List of invitees who will receive the e-sign request.
  • A minimum of 1 and a maximum of 2 invitees are allowed.
  • The order of invitees in the list determines the signing sequence.
  • The first invitee will receive the signing request and must complete signing first.
  • After the first invitee signs the document, the second invitee (if provided) will automatically receive a notification to proceed with signing.
This ensures a sequential signing workflow where each signer is notified only after the previous signer completes their action.

Callback URL

To receive status of e-signing as each signer takes action on the links shared to them. Make sure this is a HTTPS Webhook URL accepting POST request with request body and allows any hosts with CSRF excemption to recieve the event properly. Structure of the payload on the event webhook will be same as the response for he retrieve API. Please refer to the E-sign retrieve api for more information on the event payload structure.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
file_name
string
required

Name of the PDF file to be signed

file_base64
string
required

Base64 encoded PDF file content

invitees
object[]
required

List of invitees who will receive the e-sign request (maximum 2 allowed). First invitee will sign the doc and then the second will get the notification to proceed further signing.

Required array length: 1 - 2 elements
status_callback_url
string

HTTPS URL accepting POST requests on it. Here you'll recieve the status of the document signing as the signers take action and completes the siging process. The event will send the data in the same format as the retrieve APIs response. Please refere to E-sign Retrieve API for more info.

Response

E-Sign link generated successfully

code
integer
required
Example:

201

status
string
required
Example:

"success"

message
string
required
Example:

"E-Sign link generated successfully and sent to signer's email and phone."

data
object
required