Documents API
Complete reference for the Documents REST API endpoints.
1 min read184 words
Documents API #
The Documents API allows you to create, read, update, and delete documentation pages.
Endpoints #
List Documents #
http
GET /api/v1/documents
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
| page | number | Page number (default: 1) |
| perpage | number | Items per page (default: 20, max: 100) |
| status | string | Filter by status: draft, published, archived |
| category | string | Filter by category slug |
| q | string | Full-text search query |
| tag | string | Filter by tag |
json
{
"success": true,
"data": [...],
"meta": {
"page": 1,
"perpage": 20,
"total": 100,
"totalpages": 5
}
}
Create Document #
http
POST /api/v1/documents
Authorization: Bearer YOURAPIKEY
Content-Type: application/json
Request Body:
json
{
"title": "My Document",
"content": "# Hello World",
"description": "Optional description",
"category": "guides",
"tags": ["tutorial", "beginner"],
"sourceurl": "https://example.com/original",
"sourceidentifier": "example.com",
"status": "published"
}
Get Document #
http
GET /api/v1/documents/{slug}
Update Document #
http
PUT /api/v1/documents/{slug}
Authorization: Bearer YOURAPIKEY
Delete Document #
http
DELETE /api/v1/documents/{slug}
Authorization: Bearer YOURAPI_KEY