SignaRecord API

Integrate document signing directly into your applications

API Illustration

Getting Started

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.

Base URL

All API requests should be made to the following base URL:

https://api.signarecord.com/v1

API Keys

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.

API Key Security

Keep your API keys secure and never expose them in client-side code. Always make API requests from your server.

Authentication

The SignaRecord API uses API keys for authentication. You can authenticate your requests by including your API key in the request headers.

API Key Authentication

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()

Rate Limits

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 hour
  • X-RateLimit-Remaining: The number of requests remaining in the current period
  • X-RateLimit-Reset: The time at which the current rate limit window resets (Unix timestamp)

Error Handling

The SignaRecord API uses conventional HTTP response codes to indicate the success or failure of an API request.

HTTP Status Codes

  • 2xx: Success
  • 4xx: Client errors (invalid request, authentication issues)
  • 5xx: Server errors (API issues)

Error Response Format

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"
  }
}

Common Error Codes

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

Documents

The Documents API allows you to upload, retrieve, and manage documents for electronic signing.

Create Document

Upload a new document to be used for electronic signatures.

POST /documents

Request Parameters

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

Example Request

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;
};

Response

{
  "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"
}

Get Document

Retrieve information about a specific document.

GET /documents/{document_id}

Path Parameters

Parameter Type Description
document_id String The ID of the document to retrieve

Example Request

curl -X GET "https://api.signarecord.com/v1/documents/doc_1234567890" \
     -H "X-API-Key: your_api_key_here"

Response

{
  "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"
}

List Documents

Retrieve a list of all documents in your account.

GET /documents

Query Parameters

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

Example Request

curl -X GET "https://api.signarecord.com/v1/documents?limit=10&status=ready" \
     -H "X-API-Key: your_api_key_here"

Response

{
  "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 Document

Delete a document from your account.

DELETE /documents/{document_id}

Path Parameters

Parameter Type Description
document_id String The ID of the document to delete

Example Request

curl -X DELETE "https://api.signarecord.com/v1/documents/doc_1234567890" \
     -H "X-API-Key: your_api_key_here"

Response

{
  "id": "doc_1234567890",
  "deleted": true
}

Signatures

The Signatures API allows you to create and manage electronic signature requests.

Create Signature Request

Create a new signature request for a document.

POST /signature_requests

Request Parameters

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)

Example Request

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"
     }'

Response

{
  "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"
}

Ready to integrate document signing into your application?

Sign up for a free account to get started with the SignaRecord API