API Reference
Complete reference for the zSign REST API. Send documents, manage signing sessions, and integrate webhooks.
Base URL
https://api.zsign.io/apiAuthentication
Bearer YOUR_API_KEYHealth & Status
API status and health check endpoints
Check API Status
/Verify the API is running.
Request
curl https://api.zsign.io/api
Response 200
API is running
{"message": "zSign API is running"}
Health Check
/healthGet detailed health status of the API.
Request
curl https://api.zsign.io/api/health
Response 200
Health status
{"status": "healthy"}
Documents
Upload, send, and manage documents
List Documents
/api/documentsRetrieve documents with optional filtering.
Query Parameters
| Name | Type | Description |
|---|---|---|
offset | integer= 0 | Pagination offset |
limit | integer= 20 | Items per page |
status | string | Filter by status |
recipient | string | Filter by recipient email |
Request
curl -X GET "https://api.zsign.io/api/documents?limit=20" \-H "Authorization: Bearer YOUR_API_KEY"
Response 200
List of documents
{"items": [{"id": "550e8400-e29b-41d4-a716-446655440000","name": "Contract.pdf","status": "pending","created_at": "2024-01-15T10:30:00Z"}],"total": 1,"offset": 0,"limit": 20}
Upload and Send Document
/api/documents/sendUpload a PDF and send it for signing in one request. PDFs must include field annotations using {type:party:name} syntax (e.g., {signature:user}, {text:user:name}). Add * after type for required fields: {type*:party:name}. Supported types: signature, text, date, initials.
Request Body
Content-Type: multipart/form-data
Fields
| Name | Type | Description |
|---|---|---|
filerequired | file | PDF file to upload |
recipientsrequired | string | JSON array of recipients |
name | string | Document name |
[{"email": "john@example.com","name": "John Doe","role": "Signer"}]
Request
curl -X POST https://api.zsign.io/api/documents/send \-H "Authorization: Bearer YOUR_API_KEY" \-F "file=@contract.pdf" \-F 'recipients=[{"email":"john@example.com","name":"John Doe","role":"Signer"}]'
Response 201
Document sent successfully
{"document_id": "550e8400-e29b-41d4-a716-446655440000","session_id": "660e8400-e29b-41d4-a716-446655440000","signing_urls": [{"recipient_email": "john@example.com","signing_url": "https://app.zsign.io/sign/eyJ..."}]}
Signing Sessions
Create and manage signing sessions
Create Session
/api/sessionsCreate a new signing session.
Request Body
Content-Type: application/json
Fields
| Name | Type | Description |
|---|---|---|
document_idrequired | UUID | Document to sign |
document_typerequired | string | template or one_off |
recipientsrequired | array | List of recipients |
{"document_id": "550e8400-e29b-41d4-a716-446655440000","document_type": "one_off","recipients": [{"name": "John Doe","email": "john@example.com","role": "Signer","signing_order": 1}]}
Request
curl -X POST https://api.zsign.io/api/sessions \-H "Authorization: Bearer YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"document_id": "550e8400-e29b-41d4-a716-446655440000","document_type": "one_off","recipients": [{"name": "John Doe","email": "john@example.com","role": "Signer","signing_order": 1}]}'
Response 201
Session created
{"session_id": "550e8400-e29b-41d4-a716-446655440000","status": "pending","expires_at": "2024-02-14T10:30:00Z","recipients": [{"recipient_id": "770e8400-e29b-41d4-a716-446655440000","signing_url": "https://app.zsign.io/sign/eyJ..."}]}
Get Session Status
/api/sessions/{session_id}/statusGet lightweight session status.
Path Parameters
| Name | Type | Description |
|---|---|---|
session_idrequired | UUID | Session identifier |
Request
curl -X GET "https://api.zsign.io/api/sessions/{session_id}/status" \-H "Authorization: Bearer YOUR_API_KEY"
Response 200
Session status
{"session_id": "550e8400-e29b-41d4-a716-446655440000","status": "in_progress","progress": {"completed": 1,"total": 2,"percentage": 50}}
Webhooks
Configure webhook endpoints for real-time notifications
Create Webhook
/api/webhooksCreate or replace webhook configuration.
Request Body
Content-Type: application/json
Fields
| Name | Type | Description |
|---|---|---|
urlrequired | string | Webhook endpoint URL (HTTPS) |
eventsrequired | array | List of events to subscribe to |
{"url": "https://example.com/webhook","events": ["document.signed","document.completed"]}
Request
curl -X POST https://api.zsign.io/api/webhooks \-H "Authorization: Bearer YOUR_API_KEY" \-H "Content-Type: application/json" \-d '{"url": "https://example.com/webhook","events": ["document.signed", "document.completed"]}'
Response 201
Webhook created
{"id": "550e8400-e29b-41d4-a716-446655440000","url": "https://example.com/webhook","events": ["document.signed","document.completed"],"enabled": true,"secret": "whsec_..."}