Skip to content

Signers API

The Signers API allows you to manage signers associated with your documents. Each document can have multiple signers who will receive signing invitations.

Get all signers for a specific document.

GET /wp-json/wpsigner/v1/documents/{id}/signers
ParameterTypeDescription
idintegerRequired. Document ID
Terminal window
curl -X GET "https://your-site.com/wp-json/wpsigner/v1/documents/44/signers" \
-H "X-WPS-API-Key: wps_your_key" \
-H "X-WPS-API-Secret: your_secret"
[
{
"id": "38",
"name": "John Doe",
"email": "john@example.com",
"role": "signer",
"signing_order": "1",
"status": "signed",
"viewed_at": "2024-01-20 14:00:00",
"signed_at": "2024-01-20 15:30:45",
"signing_url": "https://your-site.com/?wps_sign=abc123-def456"
},
{
"id": "39",
"name": "Jane Smith",
"email": "jane@example.com",
"role": "signer",
"signing_order": "2",
"status": "pending",
"viewed_at": null,
"signed_at": null,
"signing_url": "https://your-site.com/?wps_sign=ghi789-jkl012"
}
]
FieldTypeDescription
idstringSigner ID
namestringSigner’s full name
emailstringSigner’s email address
rolestringRole: signer, viewer, approver
signing_orderstringOrder in signing sequence
statusstringCurrent status
viewed_atstring/nullTimestamp when document was viewed
signed_atstring/nullTimestamp when document was signed
signing_urlstringUnique URL for this signer
StatusDescription
pendingAwaiting action from signer
viewedSigner has viewed the document
signedSigner has signed the document
declinedSigner declined to sign

Add a new signer to a document.

POST /wp-json/wpsigner/v1/documents/{id}/signers

Note: This endpoint requires Full Access permission.

ParameterTypeDescription
idintegerRequired. Document ID
ParameterTypeRequiredDefaultDescription
namestringYes-Signer’s full name
emailstringYes-Signer’s email address
rolestringNosignerRole type
signing_orderintegerNo1Order in signing sequence
RoleDescription
signerMust sign the document
viewerCan only view, no signature required
approverMust approve before others can sign
Terminal window
curl -X POST "https://your-site.com/wp-json/wpsigner/v1/documents/44/signers" \
-H "X-WPS-API-Key: wps_your_key" \
-H "X-WPS-API-Secret: your_secret" \
-H "Content-Type: application/json" \
-d '{
"name": "Alice Johnson",
"email": "alice@example.com",
"role": "signer",
"signing_order": 3
}'
{
"id": "40",
"name": "Alice Johnson",
"email": "alice@example.com",
"role": "signer",
"signing_order": "3",
"status": "pending",
"signing_url": "https://your-site.com/?wps_sign=mno345-pqr678"
}

WPsigner supports both sequential and parallel signing workflows.

When signers have different signing_order values, they will receive invitations in order:

{
"signers": [
{ "name": "Manager", "signing_order": 1 },
{ "name": "Director", "signing_order": 2 },
{ "name": "CEO", "signing_order": 3 }
]
}

In this example:

  1. Manager receives invitation first
  2. After Manager signs, Director receives invitation
  3. After Director signs, CEO receives invitation

When signers have the same signing_order value, they can sign simultaneously:

{
"signers": [
{ "name": "Employee A", "signing_order": 1 },
{ "name": "Employee B", "signing_order": 1 },
{ "name": "Supervisor", "signing_order": 2 }
]
}

In this example:

  1. Employee A and Employee B receive invitations at the same time
  2. After both employees sign, Supervisor receives invitation

When you retrieve a document via GET /documents/{id}, the signers array includes additional details:

{
"signers": [
{
"id": "38",
"document_id": "44",
"name": "John Doe",
"email": "john@example.com",
"role": "signer",
"signing_order": "1",
"status": "signed",
"viewed_at": "2024-01-20 14:00:00",
"signed_at": "2024-01-20 15:30:45",
"declined_at": null,
"decline_reason": null,
"created_at": "2024-01-15 10:05:00",
"updated_at": "2024-01-20 15:30:45"
}
]
}
FieldTypeDescription
document_idstringParent document ID
declined_atstring/nullWhen signer declined
decline_reasonstring/nullReason for declining
created_atstringWhen signer was added
updated_atstringLast update timestamp

For security reasons, the following sensitive fields are never exposed via the API:

  • access_token - The unique signing token
  • pin_code - OTP verification code
  • signature_ip - Signer’s IP address
  • signature_user_agent - Signer’s browser info

These fields are only stored internally for audit and security purposes.


Always validate email addresses before adding signers:

const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(email)) {
throw new Error('Invalid email address');
}

You cannot add signers to completed or expired documents:

// First check document status
const doc = await fetch(`/documents/${id}`);
if (['completed', 'expired', 'declined'].includes(doc.status)) {
throw new Error('Cannot modify signers on this document');
}

Plan your signing workflow before adding signers:

const signers = [
{ name: 'Initiator', role: 'signer', signing_order: 1 },
{ name: 'Reviewer', role: 'approver', signing_order: 2 },
{ name: 'Final Approver', role: 'signer', signing_order: 3 }
];

{
"code": "create_failed",
"message": "Failed to add signer.",
"data": {
"status": 500
}
}
{
"code": "not_found",
"message": "Document not found.",
"data": {
"status": 404
}
}