API Documentation

REST API v1 · Professional & Enterprise plans

Programmatically create, send, and track documents for electronic signature using the eDocsly API. Integrate document signing into your existing workflows and applications.

Introduction

The eDocsly API allows you to automate document signing workflows. You can list templates, send documents for signature, and track their status — all programmatically.

The API is available on Professional and Enterprise plans. All requests are made to:

https://docsly.com/api/v1/

All responses are JSON. Dates are returned in ISO 8601 format.

Authentication

All API requests require a Bearer token in the Authorization header.

Creating an API Key

  1. Go to Organization → API Keys in the dashboard
  2. Click Create Key and give it a name and role
  3. Copy the key immediately — it is only shown once

Using the Key

Include the key in every request:

curl https://docsly.com/api/v1/templates \
  -H "Authorization: Bearer sk_live_abc123def456..."

Key Format

API keys start with sk_live_ followed by a 32-character hex string.

Key Roles

RolePermissions
OWNERFull access — read and send documents
EDITORRead and send documents

Rate Limits

Rate limits are applied per API key using a sliding 1-minute window.

PlanLimit
Professional60 requests / minute
Enterprise120 requests / minute

Rate Limit Headers

When you exceed the rate limit, the API responds with 429 Too Many Requests and includes these headers:

HeaderDescription
Retry-AfterSeconds to wait before retrying
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the window resets

Endpoints Overview

MethodPathDescription
GET/api/v1/templatesList active templates and their roles
GET/api/v1/rulesList active signing rules
POST/api/v1/documents/sendSend a document for signing
GET/api/v1/documents/{id}Get document status and recipient details

GET/api/v1/templates

Returns all active templates in your organization, including each template's roles (signer positions). Use the template ID and role IDs when sending documents.

Example Request

curl https://docsly.com/api/v1/templates \
  -H "Authorization: Bearer sk_live_abc123..."

Response

{
  "templates": [
    {
      "id": "tmpl_abc123",
      "name": "Employment Agreement",
      "description": "Standard employment contract",
      "createdAt": "2025-01-15T10:30:00.000Z",
      "roles": [
        { "id": "role_1", "name": "Employee", "order": 0 },
        { "id": "role_2", "name": "Manager", "order": 1 }
      ]
    }
  ]
}

GET/api/v1/rules

Returns all active signing rules in your organization. You can optionally attach rules to individual recipients when sending documents.

Example Request

curl https://docsly.com/api/v1/rules \
  -H "Authorization: Bearer sk_live_abc123..."

Response

{
  "rules": [
    {
      "id": "rule_abc123",
      "name": "Office IP Only",
      "description": "Restrict signing to office network",
      "type": "IP_RESTRICTION",
      "action": "BLOCK",
      "createdAt": "2025-01-10T08:00:00.000Z"
    }
  ]
}

POST/api/v1/documents/send

Creates a new document from a template and sends it to the specified recipients for signing. Requires OWNER or EDITOR role.

Request Body

FieldTypeRequiredDescription
templateIdstringYesID of the template to use
namestringNoCustom name for the document
recipientsarrayYesOne entry per template role (see below)
expiresAtstringNoISO 8601 expiration date

Recipient Object

FieldTypeDescription
roleIdstringTemplate role ID (from list templates)
namestringRecipient's full name
emailstringRecipient's email address
signingRuleIdsstring[]Optional IDs of signing rules to enforce for this recipient

Example Request

curl -X POST https://docsly.com/api/v1/documents/send \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "tmpl_abc123",
    "name": "John Doe - Employment Agreement",
    "recipients": [
      {
        "roleId": "role_1",
        "name": "John Doe",
        "email": "john@example.com",
        "signingRuleIds": ["rule_abc123"]
      },
      {
        "roleId": "role_2",
        "name": "Jane Smith",
        "email": "jane@example.com"
      }
    ],
    "expiresAt": "2025-12-31T23:59:59Z"
  }'

Response (201 Created)

{
  "documentId": "doc_xyz789",
  "name": "John Doe - Employment Agreement",
  "status": "PENDING",
  "recipients": [
    {
      "id": "rec_1",
      "name": "John Doe",
      "email": "john@example.com",
      "role": "Employee",
      "order": 0,
      "status": "PENDING",
      "signingRules": [
        { "id": "rule_abc123", "name": "Office IP Only", "type": "IP_RESTRICTION", "action": "BLOCK" }
      ]
    },
    {
      "id": "rec_2",
      "name": "Jane Smith",
      "email": "jane@example.com",
      "role": "Manager",
      "order": 1,
      "status": "PENDING",
      "signingRules": []
    }
  ],
  "createdAt": "2025-06-15T14:30:00.000Z"
}

GET/api/v1/documents/{id}

Returns the current status of a document, including each recipient's signing progress and their assigned signing rules.

Example Request

curl https://docsly.com/api/v1/documents/doc_xyz789 \
  -H "Authorization: Bearer sk_live_abc123..."

Response

{
  "id": "doc_xyz789",
  "name": "John Doe - Employment Agreement",
  "description": "",
  "status": "PENDING",
  "expiresAt": "2025-12-31T23:59:59.000Z",
  "completedAt": null,
  "createdAt": "2025-06-15T14:30:00.000Z",
  "updatedAt": "2025-06-15T14:30:00.000Z",
  "recipients": [
    {
      "id": "rec_1",
      "name": "John Doe",
      "email": "john@example.com",
      "role": "Employee",
      "order": 0,
      "status": "SIGNED",
      "viewedAt": "2025-06-15T15:00:00.000Z",
      "signedAt": "2025-06-15T15:05:00.000Z",
      "declinedAt": null,
      "signingRules": [
        { "id": "rule_abc123", "name": "Office IP Only", "type": "IP_RESTRICTION", "action": "BLOCK" }
      ]
    },
    {
      "id": "rec_2",
      "name": "Jane Smith",
      "email": "jane@example.com",
      "role": "Manager",
      "order": 1,
      "status": "PENDING",
      "viewedAt": null,
      "signedAt": null,
      "declinedAt": null,
      "signingRules": []
    }
  ]
}

Error Codes

All errors include an error message and a code string.

{
  "error": "Human-readable message",
  "code": "ERROR_CODE"
}
HTTP StatusCodeDescription
400VALIDATION_ERRORRequest body failed schema validation
400TEMPLATE_NOT_FOUNDTemplate does not exist or is inactive
400INCOMPLETE_RECIPIENTSNot all template roles have a recipient
400RULES_NOT_FOUNDOne or more signing rule IDs are invalid
400DOCUMENT_LIMIT_REACHEDMonthly document limit exceeded for your plan
401UNAUTHORIZEDMissing, invalid, revoked, or expired API key
403PERMISSION_DENIEDAPI key role does not have permission
403PLAN_REQUIREDNo active Professional or Enterprise subscription
404NOT_FOUNDDocument not found in your organization
429RATE_LIMIT_EXCEEDEDToo many requests — see Retry-After header

Quick Start

Send your first document in three steps.

1

Get your templates

Fetch available templates and note the template ID and role IDs.

curl https://docsly.com/api/v1/templates \
  -H "Authorization: Bearer sk_live_abc123..."
2

Send a document

Use a template ID and assign recipients to each role.

curl -X POST https://docsly.com/api/v1/documents/send \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "TEMPLATE_ID",
    "recipients": [
      { "roleId": "ROLE_ID", "name": "John Doe", "email": "john@example.com" }
    ]
  }'
3

Check status

Poll the document endpoint to track signing progress.

curl https://docsly.com/api/v1/documents/DOCUMENT_ID \
  -H "Authorization: Bearer sk_live_abc123..."

Tip: Create an API key in the dashboard to get started. Keys start with sk_live_.