Getting Started
The DocuAuthorize.com API allows you to integrate digital document signing functionality directly into your application. Our REST API provides endpoints for managing documents, templates, signature requests, and more.
Base URL
https://api.DocuAuthorize.com/v1
API Keys
To use our API, you'll need API keys. You can find these in your account dashboard under Developer Settings. We provide two types of keys:
- Test Keys: For development and testing
- Live Keys: For production use
Never expose your API keys in client-side code or public repositories.
Authentication
All API requests require authentication. We use API keys for authentication. Include your API key in the header of each request as follows:
Authorization: Bearer YOUR_API_KEY
Example Request
curl -X GET \
https://api.DocuAuthorize.com/v1/documents \
-H 'Authorization: Bearer YOUR_API_KEY'
Documents API
The Documents API allows you to create, retrieve, update, and delete documents in your account.
Create a Document
POST /documents
Upload a new document for signing.
Parameters
Parameter |
Type |
Required |
Description |
file |
File |
Yes |
The document file (PDF, DOCX, etc.) |
title |
String |
Yes |
Document title |
message |
String |
No |
Message to include with the document |
signers |
Array |
No |
Array of signers (email, name, order) |
Example Request
curl -X POST \
https://api.DocuAuthorize.com/v1/documents \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: multipart/form-data' \
-F 'file=@/path/to/document.pdf' \
-F 'title=Contract Agreement' \
-F 'message=Please sign this contract' \
-F 'signers[0][email]
[email protected]' \
-F 'signers[0][name]=John Doe' \
-F 'signers[0][order]=1'
Example Response
{
"id": "doc_123456789",
"title": "Contract Agreement",
"status": "draft",
"created_at": "2023-07-15T14:30:00Z",
"signers": [
{
"email": "
[email protected]",
"name": "John Doe",
"order": 1,
"status": "pending"
}
],
"download_url": "https://api.DocuAuthorize.com/v1/documents/doc_123456789/download"
}
List Documents
GET /documents
Retrieve a list of documents in your account.
Parameters
Parameter |
Type |
Required |
Description |
limit |
Integer |
No |
Number of documents to return (default: 20) |
offset |
Integer |
No |
Pagination offset (default: 0) |
status |
String |
No |
Filter by status (draft, sent, completed, etc.) |
Templates API
The Templates API allows you to create reusable document templates.
Create a Template
POST /templates
Create a new template from a document.
Parameters
Parameter |
Type |
Required |
Description |
file |
File |
Yes |
The template file (PDF, DOCX, etc.) |
title |
String |
Yes |
Template title |
fields |
Array |
No |
Array of fields (type, page, position) |
Signatures API
The Signatures API allows you to manage signature requests.
Send a Signature Request
POST /documents/{document_id}/send
Send a document for signature.
Parameters
Parameter |
Type |
Required |
Description |
document_id |
String |
Yes |
The ID of the document to send |
message |
String |
No |
Message to include in email |
remind_frequency |
Integer |
No |
Number of days between reminders |
Webhooks
Use webhooks to receive real-time notifications about events in your account.
Set Up a Webhook
POST /webhooks
Create a new webhook endpoint.
Parameters
Parameter |
Type |
Required |
Description |
url |
String |
Yes |
The URL to receive webhook events |
events |
Array |
Yes |
Array of events to subscribe to |
secret |
String |
No |
Secret used to sign webhook payloads |
SDKs & Libraries
We provide client libraries for popular programming languages to make integration easier.
PHP SDK
Our official PHP client library.
composer require DocuAuthorize.com/php-sdk
View on GitHub
JavaScript SDK
Our official JavaScript client library.
npm install DocuAuthorize.com-js
View on GitHub
Python SDK
Our official Python client library.
pip install DocuAuthorize.com
View on GitHub
Java SDK
Our official Java client library.
implementation 'com.DocuAuthorize.com:sdk:1.0.0'
View on GitHub
Code Examples
Here are some examples to help you get started with our API.
Upload and send a document for signature
<?php
// Include the DocuAuthorize.com PHP SDK
require_once 'vendor/autoload.php';
// Initialize with your API key
$DocuAuthorize.com = new \DocuAuthorize.com\Client('YOUR_API_KEY');
// Upload a document
$document = $DocuAuthorize.com->documents->create([
'file' => fopen('/path/to/document.pdf', 'r'),
'title' => 'Contract Agreement',
'message' => 'Please sign this contract'
]);
// Add signers to the document
$DocuAuthorize.com->documents->addSigner($document->id, [
'email' => '
[email protected]',
'name' => 'John Doe',
'order' => 1
]);
// Send the document for signature
$DocuAuthorize.com->documents->send($document->id, [
'message' => 'Please sign this document'
]);
echo "Document sent successfully: " . $document->id;
?>
Upload and send a document for signature
// Install the DocuAuthorize.com JS SDK
// npm install DocuAuthorize.com-js
const DocuAuthorize.com = require('DocuAuthorize.com-js');
const fs = require('fs');
// Initialize with your API key
const DocuAuthorize.com = new DocuAuthorize.com('YOUR_API_KEY');
// Upload a document
const documentFile = fs.readFileSync('/path/to/document.pdf');
DocuAuthorize.com.documents.create({
file: documentFile,
title: 'Contract Agreement',
message: 'Please sign this contract'
})
.then(document => {
// Add signers to the document
return DocuAuthorize.com.documents.addSigner(document.id, {
email: '
[email protected]',
name: 'John Doe',
order: 1
})
.then(() => document);
})
.then(document => {
// Send the document for signature
return DocuAuthorize.com.documents.send(document.id, {
message: 'Please sign this document'
});
})
.then(result => {
console.log('Document sent successfully:', result.id);
})
.catch(error => {
console.error('Error:', error);
});
Upload and send a document for signature
# Install the DocuAuthorize.com Python SDK
# pip install DocuAuthorize.com
import DocuAuthorize.com
# Initialize with your API key
client = DocuAuthorize.com.Client('YOUR_API_KEY')
# Upload a document
with open('/path/to/document.pdf', 'rb') as file:
document = client.documents.create(
file=file,
title='Contract Agreement',
message='Please sign this contract'
)
# Add signers to the document
client.documents.add_signer(
document.id,
email='
[email protected]',
name='John Doe',
order=1
)
# Send the document for signature
client.documents.send(
document.id,
message='Please sign this document'
)
print(f"Document sent successfully: {document.id}")