Authentication
Document endpoints require API-KEY with JSON content type.
JSON
{
"Content-Type": "application/json",
"Authorization": "Bearer {{API-KEY}}"
}Get All Documents
Retrieve all documents for a project.
GET
/api/v1/key/projects/documentsJSON
{
"success": true,
"data": [
{
"id": "Document UUID",
"name": "Document name",
"description": "Document description",
"status": "Document status",
"content": "Document content",
"createdAt": "ISO timestamp",
"updatedAt": "ISO timestamp"
}
]
}Get Document By ID
Retrieve a single document by identifier.
GET
/api/v1/key/projects/documents/:docIdJSON
{
"success": true,
"data": {
"id": "Document UUID",
"name": "Document name",
"description": "Document description",
"status": "Document status",
"content": "Document content",
"createdAt": "ISO timestamp",
"updatedAt": "ISO timestamp"
}
}Create Document
Create a new document record.
POST
/api/v1/key/projects/documentsJSON
{
"name": "Document name",
"description": "description",
"content": "content"
}| Field | Type | Optional | Nullable | Enums/Format | Description | Notes |
|---|---|---|---|---|---|---|
| name | string | false | false | - | Document title | - |
| description | string | true | true | - | Document description | - |
| content | string | false | false | - | Document body | - |
Update Document
Update metadata fields on an existing document.
PUT
/api/v1/key/projects/documents/:docIdJSON
{
"name": "updated name",
"description": "updated description"
}| Field | Type | Optional | Nullable | Enums/Format | Description | Notes |
|---|---|---|---|---|---|---|
| name | string | false | false | - | Updated name | - |
| description | string | false | false | - | Updated description | - |
Update Document Content
Patch only the content body of a document.
PATCH
/api/v1/key/projects/documents/:docId/contentJSON
{
"content": "Updated document content..."
}| Field | Type | Optional | Nullable | Enums/Format | Description | Notes |
|---|---|---|---|---|---|---|
| content | string | false | false | - | Updated document content | - |
Delete Document
Delete a document by project and document id.
DELETE
/api/v1/projects/:projectId/documents/:docIdJSON
{
"success": true,
"message": "Document deleted successfully"
}Document Object Schema
Canonical document response object fields.
| Field | Type | Optional | Nullable | Enums/Format | Description | Notes |
|---|---|---|---|---|---|---|
| id | string (uuid) | false | false | UUID | Document ID | - |
| name | string | false | false | - | Document name | - |
| description | string | true | true | - | Document description | - |
| status | string | false | false | - | Document status | - |
| content | string | false | false | - | Document content | - |
| createdAt | string | false | false | ISO 8601 | Created timestamp | - |
| updatedAt | string | false | false | ISO 8601 | Updated timestamp | - |
