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.
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
Endpoints
The following endpoints are available:
| Method | Endpoint | Description |
|---|---|---|
GET | /v3/documents | List all documents |
POST | /v3/documents | Create a document |
GET | /v3/documents/:id | Get a document |
PUT | /v3/documents/:id | Update a document |
DELETE | /v3/documents/:id | Delete a document |
Errors
DocsAPI uses conventional HTTP response codes. Errors include a descriptive message:
| Code | Description |
|---|---|
400 | Bad Request â invalid parameters |
401 | Unauthorized â invalid API key |
404 | Not Found â resource doesn't exist |
429 | Rate Limited â too many requests |
500 | Server Error â something went wrong |
Rate Limits
API requests are rate-limited to protect the service. Current limits:
- Free plan: 100 requests/minute
- Pro plan: 1,000 requests/minute
- Enterprise: Custom limits
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();