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:

StatusMeaning
200 OKRequest succeeded. DELETE also returns 200, with a JSON body
201 CreatedResource created
400 Bad RequestInvalid body or parameters, or a new item's slug is already taken
401 UnauthorizedMissing or invalid authentication
403 ForbiddenValid credential, but not allowed: missing permission, a token used outside its scope, or a plan limit reached
404 Not FoundResource not found
409 ConflictThe 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 LargeRequest body over 1 MB, or image over 5 MB
429 Too Many RequestsToo many requests. Wait, then retry (the limits are on the API authentication page)
500 Server ErrorInternal server error

Endpoints

Authentication

MethodPathDescriptionAuth
POST/api/auth/registerCreate an account. Returns a JWT and your API token (shown once, in user.api_token)None
POST/api/auth/loginSign in with email and password. Returns a JWT valid for 7 days, not your API tokenNone
GET/api/auth/meGet the current user and credential type. A space token also gets its space and workspaceJWT / Token
POST/api/auth/regenerate-tokenCreate a new account API token (shown once); the old one stops working. Browser session onlyJWT

Workspaces

MethodPathDescriptionAuth
GET/api/workspacesList all workspaces for the current userJWT / Token
POST/api/workspacesCreate a new workspaceJWT / Token
GET/api/workspaces/:idGet a workspace by IDJWT / Token
PUT/api/workspaces/:idUpdate a workspaceJWT / Token
DELETE/api/workspaces/:idMove a workspace to the trash (owner only)JWT / Token
GET/api/workspaces/:id/membersList members across the workspace's spaces (owner only)JWT / Token
POST/api/workspaces/:id/inviteAdd 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 listJWT / Token
POST/api/workspaces/:id/invitationsEmail an invitation link, valid for 7 days (body: email, space_id, role). Owner only, from a signed-in browser session. Returns 202 with accept_urlJWT
GET/api/workspaces/:id/searchSearch pages by keyword (?q=, optional spaceId; mode=semantic on Pro)JWT / Token
GET/api/resolve/:workspaceSlug/:spaceSlug/:pageSlugTurn the slugs in a web-app URL into IDs (shorter paths resolve a workspace or a space)JWT / Token

Spaces

MethodPathDescriptionAuth
GET/api/workspaces/:id/spacesList all spaces in a workspaceJWT / Token
POST/api/workspaces/:id/spacesCreate a new spaceJWT / Token
GET/api/spaces/:idGet a space by IDJWT / Token
PUT/api/spaces/:idUpdate a spaceJWT / Token
DELETE/api/spaces/:idMove a space and its pages to the trash (workspace owner only)JWT / Token

Pages

MethodPathDescriptionAuth
GET/api/spaces/:id/pagesList pages (metadata only). ?include=content adds bodies; ?hierarchy=true returns a treeJWT / Token
POST/api/spaces/:id/pagesCreate a page (title required; slug, content and parent_page_id optional)JWT / Token
GET/api/pages/:idGet a page with its content (?include=comments,children adds more)JWT / Token
PUT/api/pages/:idUpdate the title and/or content. Send version to get a 409 instead of overwriting a newer editJWT / Token
PATCH/api/pages/:id/renameChange a page's title and/or slugJWT / Token
PUT/api/pages/:id/moveMove a page (parent_page_id, space_id, display_order)JWT / Token
DELETE/api/pages/:idMove a page and its children to the trash (restorable for 30 days)JWT / Token
POST/api/pages/:id/restoreRestore a page and its children from the trashJWT / Token
GET/api/pages/:id/versionsList version history for a pageJWT / Token
POST/api/pages/:id/restore/:versionRestore an earlier version (saved as a new version)JWT / Token

Comments

MethodPathDescriptionAuth
GET/api/pages/:id/commentsList a page's commentsJWT / Token
POST/api/pages/:id/commentsAdd a comment (content; parent_comment_id for a reply)JWT / Token
PUT/api/comments/:idEdit a comment or mark it resolvedJWT / Token
DELETE/api/comments/:idDelete a commentJWT / Token

Space tokens

MethodPathDescriptionAuth
GET/api/spaces/:id/tokensList a space's tokens (never the token values)JWT / Token
POST/api/spaces/:id/tokensCreate a space token (name; optional permission, expires_at). Shown onceJWT / Token
DELETE/api/spaces/:id/tokens/:tokenIdRevoke a space tokenJWT / Token

Webhooks

MethodPathDescriptionAuth
GET/api/workspaces/:id/webhooksList webhooks for a workspaceJWT / Token
POST/api/workspaces/:id/webhooksCreate a webhookJWT / Token
PATCH/api/workspaces/:id/webhooks/:webhookIdUpdate a webhook (url, event, active, secret)JWT / Token
DELETE/api/workspaces/:id/webhooks/:webhookIdDelete a webhookJWT / 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/raw

Fetch 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 .

AgentDocs v1.1.0 · b55b6f7