Documents
Documents, folders, versions and export. 16 endpoints
GET /documents
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
q (query) | string | ||
folderId (query) | string | ||
botId (query) | string |
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/documents' \
-H "Authorization: Bearer $LEX_TOKEN"POST /documents
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | yes | length 1–200 |
folderId | string | null | ||
content | object | object | ||
markdown | string | length 0–500000 |
Example
bash
curl -X POST 'https://api.lexcetha.com/api/v1/documents' \
-H "Authorization: Bearer $LEX_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"title":"string"}'GET /documents/{documentId}
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes |
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/documents/:documentId' \
-H "Authorization: Bearer $LEX_TOKEN"PATCH /documents/{documentId}
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | length 1–200 | |
content | object | object | ||
markdown | string | length 0–500000 | |
folderId | string | null | ||
baseVersion | integer | yes | max 9007199254740991 |
proposal | object | ||
proposal.id | string | yes | length 1–∞ |
proposal.outcome | "accepted" | "partial" | yes |
Example
bash
curl -X PATCH 'https://api.lexcetha.com/api/v1/documents/:documentId' \
-H "Authorization: Bearer $LEX_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"baseVersion":1}'DELETE /documents/{documentId}
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes |
Example
bash
curl -X DELETE 'https://api.lexcetha.com/api/v1/documents/:documentId' \
-H "Authorization: Bearer $LEX_TOKEN"GET /documents/{documentId}/backlinks
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes |
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/documents/:documentId/backlinks' \
-H "Authorization: Bearer $LEX_TOKEN"GET /documents/{documentId}/agent-thread
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes | |
botId (query) | string |
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/documents/:documentId/agent-thread' \
-H "Authorization: Bearer $LEX_TOKEN"GET /documents/{documentId}/proposals
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes | |
status (query) | string |
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/documents/:documentId/proposals' \
-H "Authorization: Bearer $LEX_TOKEN"POST /document-proposals/{proposalId}/reject
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
proposalId (path) | string | yes |
Example
bash
curl -X POST 'https://api.lexcetha.com/api/v1/document-proposals/:proposalId/reject' \
-H "Authorization: Bearer $LEX_TOKEN"POST /documents/{documentId}/duplicate
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes |
Example
bash
curl -X POST 'https://api.lexcetha.com/api/v1/documents/:documentId/duplicate' \
-H "Authorization: Bearer $LEX_TOKEN"GET /documents/{documentId}/versions
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes |
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/documents/:documentId/versions' \
-H "Authorization: Bearer $LEX_TOKEN"GET /documents/{documentId}/versions/{version}
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes | |
version (path) | string | yes |
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/documents/:documentId/versions/:version' \
-H "Authorization: Bearer $LEX_TOKEN"POST /documents/{documentId}/versions/{version}/restore
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes | |
version (path) | string | yes |
Example
bash
curl -X POST 'https://api.lexcetha.com/api/v1/documents/:documentId/versions/:version/restore' \
-H "Authorization: Bearer $LEX_TOKEN"GET /documents/{documentId}/export
Parameters
| Field | Type | Required | Notes |
|---|---|---|---|
documentId (path) | string | yes |
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/documents/:documentId/export' \
-H "Authorization: Bearer $LEX_TOKEN"GET /document-folders
Example
bash
curl -X GET 'https://api.lexcetha.com/api/v1/document-folders' \
-H "Authorization: Bearer $LEX_TOKEN"POST /document-folders
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | length 1–100 |
parentId | string | null |
Example
bash
curl -X POST 'https://api.lexcetha.com/api/v1/document-folders' \
-H "Authorization: Bearer $LEX_TOKEN" \
-H 'Content-Type: application/json' \
-d '{"name":"string"}'