Integrate document signing directly into your applications
The SignaRecord API allows you to integrate electronic document signing capabilities directly into your applications. This guide will help you get started with the API and provide examples for common use cases.
All API requests should be made to the following base URL:
https://api.signarecord.com/v1
To use the SignaRecord API, you'll need an API key. You can obtain your API key from the Developer Dashboard after signing up for an account.
Keep your API keys secure and never expose them in client-side code. Always make API requests from your server.
The SignaRecord API uses API keys for authentication. You can authenticate your requests by including your API key in the request headers.
Include your API key in the X-API-Key header:
curl -X GET "https://api.signarecord.com/v1/documents" \
-H "X-API-Key: your_api_key_here"
const fetchDocuments = async () => {
const response = await fetch('https://api.signarecord.com/v1/documents', {
method: 'GET',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
}
});
const data = await response.json();
return data;
};
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.signarecord.com/v1/documents');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: your_api_key_here',
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
curl_close($ch);
?>
import requests
headers = {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
}
response = requests.get('https://api.signarecord.com/v1/documents', headers=headers)
data = response.json()
To ensure the stability of our API, we enforce rate limits on API requests. The limits vary based on your plan:
| Plan | Rate Limit | Burst Limit |
|---|---|---|
| Free | 60 requests/hour | 10 requests/minute |
| Professional | 1,000 requests/hour | 60 requests/minute |
| Business | 5,000 requests/hour | 300 requests/minute |
| Enterprise | Custom | Custom |
Rate limit information is included in the response headers:
X-RateLimit-Limit: The maximum number of requests allowed per hourX-RateLimit-Remaining: The number of requests remaining in the current periodX-RateLimit-Reset: The time at which the current rate limit window resets (Unix timestamp)The SignaRecord API uses conventional HTTP response codes to indicate the success or failure of an API request.
Error responses include a JSON object with details about the error:
{
"error": {
"code": "invalid_request",
"message": "The document ID is invalid or does not exist",
"status": 404,
"request_id": "req_1234567890"
}
}
| Error Code | Description |
|---|---|
| authentication_error | Invalid API key or authentication failure |
| invalid_request | The request was invalid or missing required parameters |
| resource_not_found | The requested resource does not exist |
| rate_limit_exceeded | You have exceeded the API rate limits |
| server_error | An error occurred on our servers |
The Documents API allows you to upload, retrieve, and manage documents for electronic signing.
Upload a new document to be used for electronic signatures.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | The document file (PDF, DOCX, etc.) |
| name | String | Yes | Name of the document |
| description | String | No | Description of the document |
| tags | Array | No | Array of tags to categorize the document |
curl -X POST "https://api.signarecord.com/v1/documents" \
-H "X-API-Key: your_api_key_here" \
-F "file=@contract.pdf" \
-F "name=Employment Contract" \
-F "description=Contract for new employees" \
-F "tags[]=employment" \
-F "tags[]=contract"
const uploadDocument = async (file) => {
const formData = new FormData();
formData.append('file', file);
formData.append('name', 'Employment Contract');
formData.append('description', 'Contract for new employees');
formData.append('tags[]', 'employment');
formData.append('tags[]', 'contract');
const response = await fetch('https://api.signarecord.com/v1/documents', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here'
},
body: formData
});
const data = await response.json();
return data;
};
{
"id": "doc_1234567890",
"name": "Employment Contract",
"description": "Contract for new employees",
"status": "ready",
"file_type": "pdf",
"file_size": 256789,
"page_count": 5,
"tags": ["employment", "contract"],
"created_at": "2023-06-15T10:30:00Z",
"updated_at": "2023-06-15T10:30:00Z",
"download_url": "https://api.signarecord.com/v1/documents/doc_1234567890/download",
"preview_url": "https://api.signarecord.com/v1/documents/doc_1234567890/preview"
}
Retrieve information about a specific document.
| Parameter | Type | Description |
|---|---|---|
| document_id | String | The ID of the document to retrieve |
curl -X GET "https://api.signarecord.com/v1/documents/doc_1234567890" \
-H "X-API-Key: your_api_key_here"
{
"id": "doc_1234567890",
"name": "Employment Contract",
"description": "Contract for new employees",
"status": "ready",
"file_type": "pdf",
"file_size": 256789,
"page_count": 5,
"tags": ["employment", "contract"],
"created_at": "2023-06-15T10:30:00Z",
"updated_at": "2023-06-15T10:30:00Z",
"download_url": "https://api.signarecord.com/v1/documents/doc_1234567890/download",
"preview_url": "https://api.signarecord.com/v1/documents/doc_1234567890/preview"
}
Retrieve a list of all documents in your account.
| Parameter | Type | Description |
|---|---|---|
| limit | Integer | Maximum number of documents to return (default: 20, max: 100) |
| offset | Integer | Number of documents to skip (for pagination) |
| status | String | Filter documents by status (ready, processing, error) |
| tag | String | Filter documents by tag |
curl -X GET "https://api.signarecord.com/v1/documents?limit=10&status=ready" \
-H "X-API-Key: your_api_key_here"
{
"data": [
{
"id": "doc_1234567890",
"name": "Employment Contract",
"description": "Contract for new employees",
"status": "ready",
"file_type": "pdf",
"created_at": "2023-06-15T10:30:00Z",
"updated_at": "2023-06-15T10:30:00Z"
},
{
"id": "doc_0987654321",
"name": "NDA Agreement",
"description": "Non-disclosure agreement",
"status": "ready",
"file_type": "pdf",
"created_at": "2023-06-14T15:45:00Z",
"updated_at": "2023-06-14T15:45:00Z"
}
],
"meta": {
"total": 45,
"limit": 10,
"offset": 0
}
}
Delete a document from your account.
| Parameter | Type | Description |
|---|---|---|
| document_id | String | The ID of the document to delete |
curl -X DELETE "https://api.signarecord.com/v1/documents/doc_1234567890" \
-H "X-API-Key: your_api_key_here"
{
"id": "doc_1234567890",
"deleted": true
}
The Signatures API allows you to create and manage electronic signature requests.
Create a new signature request for a document.
| Parameter | Type | Required | Description |
|---|---|---|---|
| document_id | String | Yes | ID of the document to be signed |
| title | String | Yes | Title of the signature request |
| message | String | No | Message to include in the signature request email |
| signers | Array | Yes | Array of signers (name, phone, role) |
| cc | Array | No | Array of CC recipients (name, phone) |
| fields | Array | No | Array of fields to be filled (type, page, position) |
| expires_at | String | No | Expiration date for the signature request (ISO 8601) |
curl -X POST "https://api.signarecord.com/v1/signature_requests" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"document_id": "doc_1234567890",
"title": "Please sign the employment contract",
"message": "Please review and sign the attached employment contract.",
"signers": [
{
"name": "John Doe",
"phone": "+15551234567",
"role": "employee"
},
{
"name": "Jane Smith",
"phone": "+15557654321",
"role": "manager"
}
],
"cc": [
{
"name": "HR Department",
"phone": "+15559876543"
}
],
"fields": [
{
"type": "signature",
"page": 1,
"position": {
"x": 100,
"y": 200,
"width": 200,
"height": 50
},
"signer_index": 0
},
{
"type": "date",
"page": 1,
"position": {
"x": 350,
"y": 200,
"width": 100,
"height": 30
},
"signer_index": 0
}
],
"expires_at": "2023-07-15T00:00:00Z"
}'
{
"id": "sig_1234567890",
"document_id": "doc_1234567890",
"title": "Please sign the employment contract",
"message": "Please review and sign the attached employment contract.",
"status": "sent",
"signers": [
{
"name": "John Doe",
"phone": "+15551234567",
"role": "employee",
"status": "pending",
"signing_url": "https://sign.signarecord.com/s/abcdef123456"
},
{
"name": "Jane Smith",
"phone": "+15557654321",
"role": "manager",
"status": "pending",
"signing_url": "https://sign.signarecord.com/s/ghijkl789012"
}
],
"cc": [
{
"name": "HR Department",
"phone": "+15559876543"
}
],
"created_at": "2023-06-15T11:30:00Z",
"updated_at": "2023-06-15T11:30:00Z",
"expires_at": "2023-07-15T00:00:00Z"
}
Sign up for a free account to get started with the SignaRecord API