Welcome to the MySignedDocuments API documentation. This guide will help you integrate our digital document signing platform into your applications and workflows.
Our REST APIs provide programmatic access to all of MySignedDocuments's features, allowing you to create custom document signing solutions for your business.
https://api.mysigneddocuments.com/v1
To use the MySignedDocuments API, you'll need to:
Authorization header.curl -X GET "https://api.mysigneddocuments.com/v1/documents" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
All API requests must include your API key in the Authorization header using the Bearer token format:
Authorization: Bearer YOUR_API_KEY
API keys have full access to your account, so keep them secure. Don't share your API keys in publicly accessible areas like GitHub, client-side code, or in your application.
You can manage your API keys from your account dashboard. You can:
The Documents API allows you to upload, manage, and send documents for signing.
/documents
Retrieves a list of all documents in your account.
| Parameter | Type | Description |
|---|---|---|
| limit | number | Maximum number of documents to return (default: 20, max: 100) |
| offset | number | Number of documents to skip (for pagination) |
| status | string | Filter by document status (draft, sent, completed, declined) |
// Example request
curl -X GET "https://api.mysigneddocuments.com/v1/documents?limit=10&status=sent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
{
"documents": [
{
"id": "doc_12345",
"name": "Contract Agreement",
"status": "sent",
"created_at": "2025-01-15T08:30:00Z",
"updated_at": "2025-01-15T09:15:00Z",
"expires_at": "2025-02-15T08:30:00Z",
"signers": [
{
"id": "signer_67890",
"email": "john@example.com",
"name": "John Smith",
"status": "signed"
},
{
"id": "signer_54321",
"email": "sarah@example.com",
"name": "Sarah Johnson",
"status": "pending"
}
]
},
// More documents...
],
"total": 45,
"limit": 10,
"offset": 0
}
/documents
Uploads a new document to your account.
| Parameter | Type | Description |
|---|---|---|
| name | string | Required. Name of the document |
| file | file | Required. The document file (PDF, DOCX, etc.) |
| signers | array | Array of signer objects with email and name |
| message | string | Message to include in the signing request email |
| expires_in | number | Number of days until the document expires (default: 30) |
The Signatures API allows you to manage signature requests and fields within documents.
/documents/{document_id}/fields
Adds signature and form fields to a document.
| Parameter | Type | Description |
|---|---|---|
| document_id | string | Required. The ID of the document |
| Parameter | Type | Description |
|---|---|---|
| fields | array | Required. Array of field objects |
// Example request
curl -X POST "https://api.mysigneddocuments.com/v1/documents/doc_12345/fields" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"fields": [
{
"type": "signature",
"page": 1,
"x": 100,
"y": 200,
"width": 200,
"height": 50,
"signer_id": "signer_67890",
"required": true
},
{
"type": "date",
"page": 1,
"x": 350,
"y": 200,
"width": 150,
"height": 50,
"signer_id": "signer_67890",
"required": true
}
]
}'
The Users API allows you to manage user accounts and permissions within your organization.
/users
Retrieves a list of all users in your organization.
// Example request
curl -X GET "https://api.mysigneddocuments.com/v1/users" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
/users
Creates a new user in your organization.
| Parameter | Type | Description |
|---|---|---|
| string | Required. User's email address | |
| first_name | string | Required. User's first name |
| last_name | string | Required. User's last name |
| role | string | User's role (admin, member, or viewer) |
Webhooks allow you to receive real-time notifications when events occur in your MySignedDocuments account.
| Event | Description |
|---|---|
document.created |
Triggered when a new document is created |
document.sent |
Triggered when a document is sent for signing |
document.viewed |
Triggered when a signer views a document |
document.signed |
Triggered when a signer signs a document |
document.completed |
Triggered when all signers have signed a document |
document.declined |
Triggered when a signer declines to sign a document |
/webhooks
Creates a new webhook endpoint.
| Parameter | Type | Description |
|---|---|---|
| url | string | Required. The URL to receive webhook events |
| events | array | Required. Array of event names to subscribe to |
| description | string | Description of the webhook's purpose |
// Example request
curl -X POST "https://api.mysigneddocuments.com/v1/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhook",
"events": ["document.signed", "document.completed"],
"description": "Notification endpoint for signed documents"
}'
We provide official client libraries for several popular programming languages to make integrating with our API even easier.
Our JavaScript SDK works in both Node.js and browser environments.
npm install mysigneddocuments.com-sdk
Our Python library is compatible with Python 3.6 and higher.
pip install mysigneddocuments.com
Our PHP library requires PHP 7.2 or higher.
composer require mysigneddocuments.com/mysigneddocuments.com-php
Our Java SDK requires Java 8 or higher.
// Add to your pom.xml
<dependency>
<groupId>com.mysigneddocuments.com</groupId>
<artifactId>mysigneddocuments.com-java</artifactId>
<version>1.0.0</version>
</dependency>
Here are some common use cases and how to implement them using our API.
// JavaScript example (Node.js)
const mysigneddocuments = require('mysigneddocuments.com-sdk');
const fs = require('fs');
const client = new mysigneddocuments('YOUR_API_KEY');
async function createAndSendDocument() {
try {
// 1. Upload the document
const documentFile = fs.readFileSync('contract.pdf');
const document = await client.documents.create({
name: 'Contract Agreement',
file: documentFile,
});
// 2. Add signers
const signers = await client.documents.addSigners(document.id, [
{
email: 'john@example.com',
name: 'John Smith',
role: 'signer'
},
{
email: 'sarah@example.com',
name: 'Sarah Johnson',
role: 'signer'
}
]);
// 3. Add signature fields
await client.documents.addFields(document.id, [
{
type: 'signature',
page: 1,
x: 100,
y: 200,
width: 200,
height: 50,
signer_id: signers[0].id,
required: true
},
{
type: 'signature',
page: 1,
x: 100,
y: 300,
width: 200,
height: 50,
signer_id: signers[1].id,
required: true
}
]);
// 4. Send the document for signing
await client.documents.send(document.id, {
message: 'Please sign this contract agreement.',
subject: 'Contract for Signature',
expires_in: 30
});
console.log('Document sent for signature!');
} catch (error) {
console.error('Error:', error);
}
}
createAndSendDocument();
# Python example
import mysigneddocuments.com
client = mysigneddocuments.com.Client('YOUR_API_KEY')
# 1. Upload the document
with open('contract.pdf', 'rb') as file:
document = client.documents.create(
name='Contract Agreement',
file=file
)
# 2. Add signers
signers = client.documents.add_signers(document.id, [
{
'email': 'john@example.com',
'name': 'John Smith',
'role': 'signer'
},
{
'email': 'sarah@example.com',
'name': 'Sarah Johnson',
'role': 'signer'
}
])
# 3. Add signature fields
client.documents.add_fields(document.id, [
{
'type': 'signature',
'page': 1,
'x': 100,
'y': 200,
'width': 200,
'height': 50,
'signer_id': signers[0]['id'],
'required': True
},
{
'type': 'signature',
'page': 1,
'x': 100,
'y': 300,
'width': 200,
'height': 50,
'signer_id': signers[1]['id'],
'required': True
}
])
# 4. Send the document for signing
client.documents.send(document.id,
message='Please sign this contract agreement.',
subject='Contract for Signature',
expires_in=30
)
print('Document sent for signature!')
// PHP example
documents->create([
'name' => 'Contract Agreement',
'file' => fopen('contract.pdf', 'r')
]);
// 2. Add signers
$signers = $client->documents->addSigners($document->id, [
[
'email' => 'john@example.com',
'name' => 'John Smith',
'role' => 'signer'
],
[
'email' => 'sarah@example.com',
'name' => 'Sarah Johnson',
'role' => 'signer'
]
]);
// 3. Add signature fields
$client->documents->addFields($document->id, [
[
'type' => 'signature',
'page' => 1,
'x' => 100,
'y' => 200,
'width' => 200,
'height' => 50,
'signer_id' => $signers[0]->id,
'required' => true
],
[
'type' => 'signature',
'page' => 1,
'x' => 100,
'y' => 300,
'width' => 200,
'height' => 50,
'signer_id' => $signers[1]->id,
'required' => true
]
]);
// 4. Send the document for signing
$client->documents->send($document->id, [
'message' => 'Please sign this contract agreement.',
'subject' => 'Contract for Signature',
'expires_in' => 30
]);
echo 'Document sent for signature!';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
?>