Skip to content

API Reference

This page is a public summary of the server HTTP interface. All endpoints follow the code (server/internal/router is the single source of truth). Failures return the unified error envelope {"error":{"code":"ERR_CODE","message":"..."}}; except for the product HTML surfaces (portal, Admin Console) and file downloads, every endpoint returns JSON.

Namespaces:

  • /api/server/* — admin surface (webadmin / ops / audit; session + CSRF + RBAC)
  • /api/client/v2/* — client employee surface (enterprise client and third-party integrations; Bearer)
  • /v1/* — LLM gateway (OpenAI / Anthropic compatible; Bearer; official native variants without /v1 also mounted)
  • /updates/client/* — client installer downloads (root path, not an API: large files + Range semantics)
codeHTTPMeaning
AUTH_REQUIRED401Missing auth token
AUTH_FAILED401Invalid/expired token or bad credentials
FORBIDDEN403Insufficient permission (admin)
NOT_FOUND404Resource not found (including strict default-deny, where unauthorized means invisible)
VALIDATION400Parameter validation failed
UPSTREAM502Upstream LLM error
RATE_LIMITED429Rate limit triggered
QUOTA_EXCEEDED429Monthly token/money quota, department budget or balance insufficient (admins exempt)
INTERNAL500Internal error
MethodPathNotes
POST/api/client/v2/auth/loginPassword login (local / LDAP): {username, password}{token}
POST/api/client/v2/auth/logoutRevoke the current token
GET/api/client/v2/auth/meCurrent user (incl. role / permissions)
GET/api/client/v2/auth/usageUsage overview: balance, today/yesterday/month/total tokens + cost, department budget chain
POST/api/client/v2/auth/passwordEmployee self-service password change (local users; all tokens are revoked afterwards and the user must log in again)
GET/api/client/v2/auth/methodsLogin-method discovery (public)
GET/api/client/v2/auth/oidc/login /callback (same for OpenID)Browser authorization login; the provider is resolved from the auth configuration at request time, so saving takes effect immediately
MethodPathNotes
POST/v1/chat/completionsOpenAI-compatible chat proxy (stream optional)
POST/v1/embeddingsEmbeddings
POST/v1/completions / /v1/responsesNative/compatible shapes
POST/v1/messagesAnthropic Messages compatible (web_search server-side proxy)
GET/v1/modelsAvailable models (enabled providers only, including input modalities)

Official native variants without /v1 are also mounted (use base_url=server); auth / rate limit / quota / metering match /v1/chat/completions.

MethodPathNotes
GET/api/client/v2/config/bootstrapPost-login bundle: {default_model, models, skills, web, connectors}

Channel content and client delivery (public)

Section titled “Channel content and client delivery (public)”

The client login page needs the brand and the installer before anyone has logged in, so this group requires no authentication:

MethodPathNotes
GET/api/client/v2/channelChannel content: channel id, title, login-page/client names and taglines, accent color
GET/HEAD/api/client/v2/channel/logoChannel logo (light variant)
GET/HEAD/api/client/v2/channel/logo-darkChannel logo (dark variant)
GET/HEAD/api/client/v2/channel/faviconChannel favicon
GET/api/client/v2/updates/manifestClient version manifest: {schema, channel_id, server:{version}, client:{version, assets}}; returns a client_unavailable reason when it cannot provide an absolute https address
GET/HEAD/updates/client/<filename>Installer download (extension whitelist; Range resume; long cache)
GET/ /portalPortal home (plain HTML, no scripts): brand + three-platform download entries

The client upgrades from this: the manifest channel_id must match the server, the installer address must be absolute https, and the download is verified against the SHA-256 in the manifest.

Marketplace and shared content (employee surface)

Section titled “Marketplace and shared content (employee surface)”
MethodPathNotes
GET/api/client/v2/marketplace/skillsSkill catalog (grant-visible)
GET/api/client/v2/marketplace/skills/:name /:name/archiveSkill detail / download a skill package
GET/api/client/v2/shared-skillsShared skills (approved + granted, plus your own uploads in any state)
POST/api/client/v2/shared-skillsUpload a shared skill (base64 archive, ≤16MB, top-level SKILL.md), stored in DB
GET/api/client/v2/shared-skills/:name/:version/archiveDownload a shared skill package
GET/api/client/v2/agent-presetsShared agents (same two-gate model)
POST/api/client/v2/agent-presetsUpload a shared agent (top-level agent.cordis.yml)
GET/api/client/v2/agent-presets/:name/archive /:name/:version/archiveDownload a shared agent package
GET/api/client/v2/capabilities?source=market|org&type=&q=Capability Hub unified catalog: market + org merged
POST/api/client/v2/telemetry/skill-callReport a skill call (increments calls; rate limit configurable)

Shared-content visibility = approved + granted (user/department) two-gate model; admins always full access; unauthorized 404 without leaking existence.

Admin (/api/server/admin/*, session + CSRF + RBAC)

Section titled “Admin (/api/server/admin/*, session + CSRF + RBAC)”
MethodPathNotes
POST/api/server/admin/loginAdmin login (super_admin / auditor; user → 403)
GET/me /logoutCurrent admin / sign out
POST/me/passwordChange your own password (revokes all sessions)
GET/POST/me/mfa /me/mfa/enable /me/mfa/verify /me/mfa/disableAdmin TOTP codes (view / enable / verify / disable)
GET/POST/PUT/DELETE/users /users/:idUser CRUD (quota, role, status, reset password, reset MFA)
PUT/users/:id/departmentSet department membership (group_ids array, multi-department supported)
GET/POST/PUT/DELETE/departments /departments/:idDepartment tree and budgets
POST/users/:id/balanceEmployee balance adjustment (add / deduct / set, audited)
GET/PUT/POST/balance /balance/grantBalance gate and monthly grant configuration / manual grant (idempotent)
GET/users/:id/tokens, POST /tokens/:id/revokeView and revoke login tokens
GET/usage /usage/overview /usage/requestsUsage summary / overview / detail (paged, 90-day window cap)
GET/POST/PUT/DELETE/report-subscriptions /:id /:id/testUsage report subscriptions and test push
GET/server-info /concurrency /audit /audit/settingsServer info / model concurrency / audit log / audit retention policy
GET/PUT/POST/auth /auth/testAuth configuration and connectivity test (LDAP directory statistics / OIDC discovery document)
GET/POST/PUT/DELETE/providers /providers/:id /models /gatewayGateway providers, models (pricing / cache price / off-peak discount / input modalities), gateway config
GET/providers/:id/balance /channelsUpstream account balance (where supported) / channel list
GET/POST/PUT/DELETE/skills /agents and their archive and grant endpointsSkill marketplace and agent catalog management
GET/POST/shared-skills/* /agent-presets/*Shared-content review (approve / reject / delete / quality / grants)
GET/capabilities/approvalsCapability Hub unified approval queue (read-only; actions via domain endpoints)
PUT/apps/:kind/:app_id/ownerTransfer capability ownership (owner)
GET/PUT/portalPortal page configuration (whether it is public, download URL overrides, description text)
GET/PUT/connectorsConnector catalog management
PathNotes
/ /portalPortal home (product HTML surface, plain HTML + CSS)
/admin/webadmin SPA (embedded via go:embed)
/healthzHealth probe (JSON, DB ping; 503 = DB unavailable)

Endpoints and full field docs not listed here live in the repository at server/docs/03-api-reference.md.