Leypal Corp Docs

Signature Endpoints

Reference for electronic signature creation, management, and tracking

Signature Endpoints

The Signatures API lets you create electronic signature requests, send them to recipients, track their status, and cancel them when needed.

All requests require a valid API key in the Authorization header. See the Authentication guide for details.

Base URL: https://api.leypal.dev/api/v1


Create Draft Signature

POST /api/v1/signatures

Creates a new signature in draft status. After creating the draft you will upload the document separately and then call the Send Signature endpoint to dispatch the signing request to all recipients.

Request body

FieldTypeRequiredDescription
typestringYesSignature type. One of advanced, fast, self_signed, in_person
originalDocumentNamestringYesHuman-readable name of the document (e.g. "Contract Q1 2024.pdf")
originalDocumentTypestringYesMIME type of the document (e.g. "application/pdf")
originalDocumentExtensionstringYesFile extension without dot (e.g. "pdf", "docx")

Example request

curl -X POST https://api.leypal.dev/api/v1/signatures \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "advanced",
    "originalDocumentName": "Service Agreement.pdf",
    "originalDocumentType": "application/pdf",
    "originalDocumentExtension": "pdf"
  }'

Example response

{
  "id": 1042,
  "type": "advanced",
  "status": "draft",
  "documentStatus": "draft",
  "senderName": "Hugo Gutierrez",
  "subject": "",
  "messageContent": "",
  "originalDocumentName": "Service Agreement.pdf",
  "originalDocumentType": "application/pdf",
  "originalDocumentExtension": "pdf",
  "organizationId": 7,
  "createdByUserId": 3,
  "createdAt": "2024-11-15T09:30:00.000Z",
  "updatedAt": "2024-11-15T09:30:00.000Z"
}

Note: The returned id is the signatureId used in all subsequent endpoints for this signature.


List Signatures

GET /api/v1/signatures

Returns a paginated list of signatures belonging to the authenticated organization.

Query parameters

ParameterTypeRequiredDescription
skipnumberNoNumber of records to skip (default: 0)
limitnumberNoMax records to return per page (default: 20)
statusstringNoFilter by status. One of draft, created, scheduled, expired, partially_signed, completed, rejected
typestringNoFilter by type. One of advanced, fast, self_signed, in_person
fileNamestringNoFilter by document file name (partial match)
subjectstringNoFilter by subject line (partial match)
datestringNoFilter by exact sent date (YYYY-MM-DD)
dateFromstringNoFilter sent date from (YYYY-MM-DD)
dateTostringNoFilter sent date to (YYYY-MM-DD)
recipientsstringNoComma-separated list of signer emails to filter by
sortBystringNoSort field. One of createdAt, dateSent, updatedAt
sortOrderstringNoSort direction. One of asc, desc

Example request

curl -X GET "https://api.leypal.dev/api/v1/signatures?status=created&limit=10&skip=0&sortBy=createdAt&sortOrder=desc" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "items": [
    {
      "id": 1042,
      "type": "advanced",
      "status": "created",
      "subject": "Service Agreement — please sign",
      "senderName": "Hugo Gutierrez",
      "dateSent": "2024-11-15T09:35:00.000Z",
      "expiresDate": "2024-12-15T09:35:00.000Z",
      "createdAt": "2024-11-15T09:30:00.000Z",
      "updatedAt": "2024-11-15T09:35:00.000Z",
      "signers": [
        {
          "id": 501,
          "email": "signer@example.com",
          "name": "Jane Doe",
          "status": "pending"
        }
      ]
    }
  ],
  "total": 1,
  "skip": 0,
  "limit": 10
}

Get Signature

GET /api/v1/signatures/{signatureId}

Returns the full details of a single signature, including its current status and all signers.

Path parameters

ParameterTypeRequiredDescription
signatureIdnumberYesThe numeric ID of the signature

Example request

curl -X GET https://api.leypal.dev/api/v1/signatures/1042 \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "id": 1042,
  "type": "advanced",
  "status": "partially_signed",
  "documentStatus": "ready",
  "subject": "Service Agreement — please sign",
  "messageContent": "Hi, please review and sign the attached document.",
  "senderName": "Hugo Gutierrez",
  "dateSent": "2024-11-15T09:35:00.000Z",
  "expiresDate": "2024-12-15T09:35:00.000Z",
  "requireVerification": false,
  "ccOnComplete": ["manager@example.com"],
  "createdAt": "2024-11-15T09:30:00.000Z",
  "updatedAt": "2024-11-16T14:10:00.000Z",
  "signers": [
    {
      "id": 501,
      "email": "signer@example.com",
      "name": "Jane Doe",
      "status": "signed",
      "signedAt": "2024-11-16T14:10:00.000Z"
    },
    {
      "id": 502,
      "email": "second@example.com",
      "name": "John Smith",
      "status": "pending",
      "signedAt": null
    }
  ]
}

Signature status values

StatusDescription
draftCreated but not yet configured or sent
createdConfigured and dispatched to signers
scheduledQueued for future dispatch
expiredSigning deadline passed without all signers completing
partially_signedAt least one signer has signed, others pending
completedAll signers have signed
rejectedOne or more signers rejected the document

Get Signature Status

GET /api/v1/signatures/{signatureId}/status

Returns a lightweight status summary for a signature. Useful for polling without fetching the full object.

Path parameters

ParameterTypeRequiredDescription
signatureIdnumberYesThe numeric ID of the signature

Example request

curl -X GET https://api.leypal.dev/api/v1/signatures/1042/status \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "id": 1042,
  "status": "partially_signed",
  "documentStatus": "ready",
  "signers": [
    { "id": 501, "email": "signer@example.com", "status": "signed" },
    { "id": 502, "email": "second@example.com", "status": "pending" }
  ]
}

Send Signature

POST /api/v1/signatures/{signatureId}/send

Finalizes a draft signature and sends signing invitation emails to all configured signers. This transitions the signature from draft to created status.

Path parameters

ParameterTypeRequiredDescription
signatureIdnumberYesThe numeric ID of the signature to send

Request body

FieldTypeRequiredDescription
signersarrayYesList of signer objects. Each signer must have at minimum an email field
signers[].emailstringYesSigner email address
signers[].namestringNoSigner display name
signers[].ordernumberNoSigning order (for sequential workflows)
subjectstringNoEmail subject line sent to signers
messageContentstringNoBody message included in the signing invitation email
senderNamestringNoName shown as sender in signing invitation emails
expiresDatestringNoISO 8601 expiry date for the signing request
ccOnCompletearrayNoList of email addresses to CC when signing is complete
requireVerificationbooleanNoRequire identity verification before signing (default: false)
categoryIdnumberNoCategory ID to associate this signature with

Note: Signer emails within the same signature request must be unique. Duplicate emails will return a 400 validation error.

Example request

curl -X POST https://api.leypal.dev/api/v1/signatures/1042/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "signers": [
      { "email": "signer@example.com", "name": "Jane Doe" },
      { "email": "second@example.com", "name": "John Smith" }
    ],
    "subject": "Service Agreement — please sign",
    "messageContent": "Hi, please review and sign the attached document at your earliest convenience.",
    "senderName": "Hugo Gutierrez",
    "expiresDate": "2024-12-15T09:35:00.000Z",
    "ccOnComplete": ["manager@example.com"],
    "requireVerification": false
  }'

Example response

{
  "id": 1042,
  "type": "advanced",
  "status": "created",
  "subject": "Service Agreement — please sign",
  "messageContent": "Hi, please review and sign the attached document at your earliest convenience.",
  "senderName": "Hugo Gutierrez",
  "dateSent": "2024-11-15T09:35:00.000Z",
  "expiresDate": "2024-12-15T09:35:00.000Z",
  "requireVerification": false,
  "ccOnComplete": ["manager@example.com"],
  "createdAt": "2024-11-15T09:30:00.000Z",
  "updatedAt": "2024-11-15T09:35:00.000Z",
  "signers": [
    { "id": 501, "email": "signer@example.com", "name": "Jane Doe", "status": "pending" },
    { "id": 502, "email": "second@example.com", "name": "John Smith", "status": "pending" }
  ]
}

Cancel Signature

DELETE /api/v1/signatures/{signatureId}

Soft-deletes a signature, preventing any further signing actions. Signing links already sent to recipients will no longer work after cancellation.

Path parameters

ParameterTypeRequiredDescription
signatureIdnumberYesThe numeric ID of the signature to cancel

Example request

curl -X DELETE https://api.leypal.dev/api/v1/signatures/1042 \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

Returns 200 OK with the soft-deleted signature object:

{
  "id": 1042,
  "status": "draft",
  "deletedAt": "2024-11-15T10:00:00.000Z"
}

Note: Only signatures your organization owns can be cancelled. Attempting to delete another organization's signature returns 403 Forbidden.


Send Signer Reminder

POST /api/v1/signatures/{signatureId}/signers/{signerId}/notification

Sends a reminder email to a specific signer who has not yet signed.

Path parameters

ParameterTypeRequiredDescription
signatureIdnumberYesThe numeric ID of the signature
signerIdnumberYesThe numeric ID of the signer to remind

Example request

curl -X POST https://api.leypal.dev/api/v1/signatures/1042/signers/502/notification \
  -H "Authorization: Bearer YOUR_API_KEY"

Example response

{
  "message": "Reminder sent to second@example.com"
}

Update Signer Email

PATCH /api/v1/signatures/{signatureId}/signers/{signerId}

Updates the email address of a signer before they have signed. Useful when a recipient's email was entered incorrectly.

Path parameters

ParameterTypeRequiredDescription
signatureIdnumberYesThe numeric ID of the signature
signerIdnumberYesThe numeric ID of the signer to update

Request body

FieldTypeRequiredDescription
emailstringYesNew email address for the signer

Example request

curl -X PATCH https://api.leypal.dev/api/v1/signatures/1042/signers/502 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "email": "corrected@example.com" }'

Example response

{
  "id": 502,
  "email": "corrected@example.com",
  "name": "John Smith",
  "status": "pending"
}

On this page