API Reference
The DocLD API is organized around REST. It uses API keys for authentication, returns JSON responses, and uses standard HTTP status codes.
Base URL
https://docld.com/api/v1Authentication
Include your API key in the Authorization header:
curl https://docld.com/api/v1/documents \
-H "Authorization: Bearer docld_..."Create and manage API keys in Settings → API Keys. See Authentication for details.
Endpoints
Documents
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/documents | Upload a document |
GET | /v1/documents | List documents |
GET | /v1/documents/:id | Retrieve a document |
DELETE | /v1/documents/:id | Delete a document |
GET | /v1/documents/:id/content | Get parsed content |
Collections
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/collections | Create a collection |
GET | /v1/collections | List collections |
GET | /v1/collections/:id | Retrieve a collection |
POST | /v1/collections/:id | Update a collection |
DELETE | /v1/collections/:id | Delete a collection |
POST | /v1/collections/:id/documents | Add or remove a document |
Schemas
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/schemas | Create a schema |
GET | /v1/schemas | List schemas |
GET | /v1/schemas/:id | Retrieve a schema |
POST | /v1/schemas/:id | Update a schema |
DELETE | /v1/schemas/:id | Delete a schema |
Extractions
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/extractions | Run an extraction |
GET | /v1/extractions/:id | Retrieve extraction result |
Chat
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/chat/completions | Ask a question about your docs |
Search
| Method | Endpoint | Description |
|---|---|---|
POST | /v1/search | Semantic search over docs |
Jobs
| Method | Endpoint | Description |
|---|---|---|
GET | /v1/jobs/:id | Check job or document processing status |
Use this endpoint to poll for completion after uploading a document (the job ID is the document ID until processing finishes). See Jobs for request/response details.
Response Format
Every object includes an id and object field identifying its type:
{
"id": "doc_abc123",
"object": "document",
"name": "invoice.pdf",
"status": "completed",
"created": 1710000000
}List endpoints return a standard envelope:
{
"object": "list",
"data": [...],
"has_more": false,
"total": 42
}Pagination
List endpoints accept limit and offset query parameters:
| Parameter | Default | Max | Description |
|---|---|---|---|
limit | 20 | 100 | Number of objects to return |
offset | 0 | — | Number of objects to skip |
Timestamps
All timestamps are returned as Unix epoch seconds (integer), not ISO strings.
Request IDs
Every response includes an x-request-id header. Include this when contacting support.