API reference
The REST endpoints most integrations need, with examples. llms-full.txt lists every endpoint; Swagger UI covers most of them.
Interactive API explorer: Send real requests from your browser in Swagger UI .
Base URL
All API endpoints are relative to the base URL:
https://agentdocs.eu
Request format
Send request bodies as JSON, up to 1 MB. Image uploads are the exception: they use multipart/form-data.
Content-Type: application/json
Send your credential in the Authorization header. See the API authentication guide for details.
Response format
Responses are JSON, except the shared-page /raw endpoint, which returns Markdown (text/markdown), and the PDF book export. Status codes:
| Status | Meaning |
|---|---|
| 200 OK | Request succeeded. DELETE also returns 200, with a JSON body |
| 201 Created | Resource created |
| 400 Bad Request | Invalid body or parameters, or a new item's slug is already taken |
| 401 Unauthorized | Missing or invalid authentication |
| 403 Forbidden | Valid credential, but not allowed: missing permission, a token used outside its scope, or a plan limit reached |
| 404 Not Found | Resource not found |
| 409 Conflict | The page changed since the version you sent, a rename hit a slug already in use, or the item's space or workspace is in the trash |
| 413 Payload Too Large | Request body over 1 MB, or image over 5 MB |
| 429 Too Many Requests | Too many requests. Wait, then retry (the limits are on the API authentication page) |
| 500 Server Error | Internal server error |
Endpoints
Authentication
| Method | Path | Description | Auth |
|---|---|---|---|
| POST | /api/auth/register | Create an account. Returns a JWT and your API token (shown once, in user.api_token) | None |
| POST | /api/auth/login | Sign in with email and password. Returns a JWT valid for 7 days, not your API token | None |
| GET | /api/auth/me | Get the current user and credential type. A space token also gets its space and workspace | JWT / Token |
| POST | /api/auth/regenerate-token | Create a new account API token (shown once); the old one stops working. Browser session only | JWT |
Workspaces
| Method | Path | Description | Auth |
|---|---|---|---|
| GET | /api/workspaces | List all workspaces for the current user | JWT / Token |
| POST | /api/workspaces | Create a new workspace | JWT / Token |
| GET | /api/workspaces/:id | Get a workspace by ID | JWT / Token |
| PUT | /api/workspaces/:id | Update a workspace | JWT / Token |
| DELETE | /api/workspaces/:id | Move a workspace to the trash (owner only) | JWT / Token |
| GET | /api/workspaces/:id/members | List members across the workspace's spaces (owner only) | JWT / Token |
| POST | /api/workspaces/:id/invite | Add an existing user to a space at once (body: email, space_id, role). Owner only. Always returns 202, even if the address has no account, so check the members list | JWT / Token |
| POST | /api/workspaces/:id/invitations | Email an invitation link, valid for 7 days (body: email, space_id, role). Owner only, from a signed-in browser session. Returns 202 with accept_url | JWT |
| GET | /api/workspaces/:id/search | Search pages by keyword (?q=, optional spaceId; mode=semantic on Pro) | JWT / Token |
| GET | /api/resolve/:workspaceSlug/:spaceSlug/:pageSlug | Turn the slugs in a web-app URL into IDs (shorter paths resolve a workspace or a space) | JWT / Token |
Spaces
| Method | Path | Description | Auth |
|---|---|---|---|
| GET | /api/workspaces/:id/spaces | List all spaces in a workspace | JWT / Token |
| POST | /api/workspaces/:id/spaces | Create a new space | JWT / Token |
| GET | /api/spaces/:id | Get a space by ID | JWT / Token |
| PUT | /api/spaces/:id | Update a space | JWT / Token |
| DELETE | /api/spaces/:id | Move a space and its pages to the trash (workspace owner only) | JWT / Token |
Pages
| Method | Path | Description | Auth |
|---|---|---|---|
| GET | /api/spaces/:id/pages | List pages (metadata only). ?include=content adds bodies; ?hierarchy=true returns a tree | JWT / Token |
| POST | /api/spaces/:id/pages | Create a page (title required; slug, content and parent_page_id optional) | JWT / Token |
| GET | /api/pages/:id | Get a page with its content (?include=comments,children adds more) | JWT / Token |
| PUT | /api/pages/:id | Update the title and/or content. Send version to get a 409 instead of overwriting a newer edit | JWT / Token |
| PATCH | /api/pages/:id/rename | Change a page's title and/or slug | JWT / Token |
| PUT | /api/pages/:id/move | Move a page (parent_page_id, space_id, display_order) | JWT / Token |
| DELETE | /api/pages/:id | Move a page and its children to the trash (restorable for 30 days) | JWT / Token |
| POST | /api/pages/:id/restore | Restore a page and its children from the trash | JWT / Token |
| GET | /api/pages/:id/versions | List version history for a page | JWT / Token |
| POST | /api/pages/:id/restore/:version | Restore an earlier version (saved as a new version) | JWT / Token |
Space tokens
| Method | Path | Description | Auth |
|---|---|---|---|
| GET | /api/spaces/:id/tokens | List a space's tokens (never the token values) | JWT / Token |
| POST | /api/spaces/:id/tokens | Create a space token (name; optional permission, expires_at). Shown once | JWT / Token |
| DELETE | /api/spaces/:id/tokens/:tokenId | Revoke a space token | JWT / Token |
Webhooks
| Method | Path | Description | Auth |
|---|---|---|---|
| GET | /api/workspaces/:id/webhooks | List webhooks for a workspace | JWT / Token |
| POST | /api/workspaces/:id/webhooks | Create a webhook | JWT / Token |
| PATCH | /api/workspaces/:id/webhooks/:webhookId | Update a webhook (url, event, active, secret) | JWT / Token |
| DELETE | /api/workspaces/:id/webhooks/:webhookId | Delete a webhook | JWT / Token |
In the Auth column, Token means an account API token or a space token. A space token works only inside its own space: the space, its pages, comments and share links. Every other route needs an account token or a browser session (JWT).
Example requests
Create a page
curl -X POST https://agentdocs.eu/api/spaces/SPACE_ID/pages \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Getting Started",
"content": "# Getting Started\n\nWelcome to our docs!",
"parent_page_id": null
}'
# slug is optional: it is generated from the title.
# Response (201 Created), abridged:
{
"page": {
"id": "6f1c2a9e-4b7d-4e2a-9c51-0d3e8b7a2f14",
"space_id": "b2d4e6f8-1a3c-4e5f-8a7b-9c0d1e2f3a4b",
"parent_page_id": null,
"title": "Getting Started",
"slug": "getting-started",
"content": "# Getting Started\n\nWelcome to our docs!",
"author_id": "0a9b8c7d-6e5f-4a3b-2c1d-0e9f8a7b6c5d",
"version": 1,
"last_edited_via": "api_token",
"created_at": "2026-10-26T10:30:00.000Z",
"updated_at": "2026-10-26T10:30:00.000Z"
}
}Update a page without overwriting newer edits
curl -X PUT https://agentdocs.eu/api/pages/PAGE_ID \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "# Getting Started\n\nUpdated text.", "version": 1}'
# Response (200 OK): {"page": {...}} with "version": 2
# If someone saved a newer version first (409 Conflict):
{
"error": "Version conflict",
"conflict": true,
"message": "Version conflict. Page was modified since the version you edited.",
"current_version": 2,
"current_content": "# Getting Started\n\n…"
}Create a share link
curl -X POST https://agentdocs.eu/api/pages/PAGE_ID/share \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"expires_in_days": 30}'
# Response (201 Created):
{
"share_link": {
"id": "c3e1f2a4-5b6d-4c7e-8f90-a1b2c3d4e5f6",
"token": "a1b2c3d4e5f6…",
"url": "/shared/a1b2c3d4e5f6…",
"expires_at": "2026-11-25T10:35:00.000Z",
"created_at": "2026-10-26T10:35:00.000Z"
}
}
# The token is 64 hex characters. Use it to:
# open the page in a browser: https://agentdocs.eu/shared/SHARE_TOKEN
# fetch it as Markdown: https://agentdocs.eu/api/shared/SHARE_TOKEN/rawFetch a shared page as Markdown
curl https://agentdocs.eu/api/shared/SHARE_TOKEN/raw # Response (200 OK, Content-Type: text/markdown; charset=utf-8): --- title: Getting Started shared_via: AgentDocs last_updated: 2026-10-26T10:30:00.000Z --- # Getting Started Welcome to our docs!
Want more details? Every endpoint, with request and response examples, is in llms-full.txt . Schemas and in-browser requests are in Swagger UI .
Comments