Introduction

Get started with DocsAPI in minutes.

Welcome to the DocsAPI documentation. DocsAPI is a powerful, RESTful API that allows you to integrate document management capabilities into your applications quickly and easily.

✅ New: Version 3.0 is now available with improved performance and new features. Check the changelog for details.

Quick Start

Getting started is simple. First, install the SDK:

npm install @docsapi/sdk

Then initialize the client with your API key:

import { DocsAPI } from '@docsapi/sdk';

const client = new DocsAPI({
  apiKey: 'your-api-key-here',
  baseUrl: 'https://api.docsapi.io/v3'
});

// Create a document
const doc = await client.documents.create({
  title: 'My First Document',
  content: 'Hello, World!'
});

console.log(doc.id); // doc_abc123

Installation

DocsAPI is available via npm, yarn, or CDN. Choose the method that works best for your project:

# npm
npm install @docsapi/sdk

# yarn
yarn add @docsapi/sdk

# CDN (browser)
<script src="https://cdn.docsapi.io/sdk/v3/docsapi.min.js"></script>

Authentication

All API requests require authentication via an API key. Include your key in the Authorization header:

Authorization: Bearer your-api-key-here
âš ī¸ Important: Never expose your API key in client-side code. Always use a backend proxy for API calls.

Endpoints

The following endpoints are available:

MethodEndpointDescription
GET/v3/documentsList all documents
POST/v3/documentsCreate a document
GET/v3/documents/:idGet a document
PUT/v3/documents/:idUpdate a document
DELETE/v3/documents/:idDelete a document

Errors

DocsAPI uses conventional HTTP response codes. Errors include a descriptive message:

CodeDescription
400Bad Request — invalid parameters
401Unauthorized — invalid API key
404Not Found — resource doesn't exist
429Rate Limited — too many requests
500Server Error — something went wrong

Rate Limits

API requests are rate-limited to protect the service. Current limits:

â„šī¸ Tip: Use the X-RateLimit-Remaining response header to track your quota.

Webhooks

DocsAPI can send webhooks to notify your application of events. Configure webhook URLs in your dashboard.

{
  "event": "document.created",
  "data": {
    "id": "doc_abc123",
    "title": "New Document",
    "created_at": "2026-05-31T12:00:00Z"
  }
}

Pagination

List endpoints support cursor-based pagination. Use the cursor and limit parameters:

GET /v3/documents?limit=20&cursor=abc123

JavaScript SDK

The JavaScript SDK works in both Node.js and browser environments:

import { DocsAPI } from '@docsapi/sdk';
const client = new DocsAPI({ apiKey: 'key' });
const docs = await client.documents.list();

Python SDK

Install via pip and start using DocsAPI in Python:

pip install docsapi

from docsapi import DocsAPI
client = DocsAPI(api_key='key')
docs = client.documents.list()

PHP SDK

Install via Composer for PHP projects:

composer require docsapi/sdk

$client = new DocsAPI('your-api-key');
$docs = $client->documents->list();