Skip to content

REST API Overview

The WPsigner REST API allows you to interact with your documents, signers, and signing workflows programmatically. Built on top of the WordPress REST API, it provides secure endpoints for managing electronic signatures.

All API endpoints are available at:

https://your-site.com/wp-json/wpsigner/v1/

WPsigner uses API Key + Secret authentication. You’ll need to generate credentials from the WordPress admin panel.

  1. Go to WPsigner → More → API in your WordPress admin
  2. Click Create New Key
  3. Enter a name and description for your key
  4. Select the permission level:
    • Full Access: Read and write operations
    • Read Only: Only GET requests allowed
  5. Click Create Key
  6. Important: Copy and save the API Secret immediately. It will only be shown once!

Include the following headers in all API requests:

Terminal window
X-WPS-API-Key: wps_your_api_key_here
X-WPS-API-Secret: your_api_secret_here
Terminal window
curl -X GET "https://your-site.com/wp-json/wpsigner/v1/documents" \
-H "X-WPS-API-Key: wps_PPF0L3qPubG4YedgDx5H5IqMpTgfv5h3" \
-H "X-WPS-API-Secret: heP9XXeZJJPMttYg4XfRXe6YFvCW..."

All responses are returned in JSON format. Successful responses typically include the requested data:

{
"id": "44",
"title": "Contract Agreement",
"status": "sent",
"created_at": "2024-01-15 10:30:00"
}

Errors follow the WordPress REST API error format:

{
"code": "rest_forbidden",
"message": "Invalid API key or secret.",
"data": {
"status": 401
}
}
CodeDescription
200Success
201Created (for POST requests)
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing credentials
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limit exceeded
500Server Error

To protect your server and ensure fair usage, the API implements rate limiting:

  • Per API Key: 1,000 requests per hour
  • Per IP Address: 100 requests per minute (for unauthenticated requests)

When you exceed the rate limit, you’ll receive a 429 response:

{
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded. Please wait 45 seconds before trying again.",
"data": {
"status": 429,
"retry_after": 45
}
}

API key permissions determine which operations are allowed:

PermissionGETPOSTPUTDELETE
Full Access
Read Only

If you attempt a write operation with a Read Only key, you’ll receive:

{
"code": "rest_forbidden",
"message": "This API key has read-only permissions.",
"data": {
"status": 403
}
}
MethodEndpointDescription
GET/documentsList all documents
POST/documentsCreate a new document
GET/documents/{id}Get document details
PUT/documents/{id}Update a document
DELETE/documents/{id}Delete a document
GET/documents/{id}/signersList signers
POST/documents/{id}/signersAdd a signer
GET/documents/{id}/fieldsList document fields
POST/documents/{id}/fieldsSave document fields
POST/documents/{id}/sendSend for signing
GET/documents/{id}/auditGet audit trail
GET/statsGet statistics