Documentation

Admin API reference

Every action in the admin console is a thin wrapper over the JSON API documented here. All endpoints live under https://app.orgmcp.io/api/t/<slug>/... and are authenticated either by your session cookie (browser) or an omcp_… API key (server-to-server).

Authentication

Pass the API key as a bearer token:

curl https://app.orgmcp.io/api/t/acme/whoami \
  -H "Authorization: Bearer omcp_..._..."

The token's tenant scope is implicit in the prefix; passing a key minted in workspace A to /api/t/B/... returns 403.

Endpoints

Whoami

GET /api/whoami — returns the authenticated user, memberships, and the active tenant. Session cookie or omcp_… bearer. This is the identity probe the console uses; it is not under /api/t/<slug>.

Members

  • GET /api/t/<slug>/members
  • POST /api/t/<slug>/invites — body: { emails, role }
  • PATCH /api/t/<slug>/members/<userId>/role — body: { role } (owner-only for the owner role)
  • POST /api/t/<slug>/members/<userId>/reactivate — restore a suspended member
  • DELETE /api/t/<slug>/members/<userId> — suspend (soft-remove) a member

Groups

  • GET /api/t/<slug>/groups
  • POST /api/t/<slug>/groups — body: { name, description }
  • POST /api/t/<slug>/groups/<groupId>/members — body: { userId }
  • DELETE /api/t/<slug>/groups/<groupId>/members/<userId>
  • DELETE /api/t/<slug>/groups/<groupId>

Connectors & knowledge sources

  • GET /api/t/<slug>/connectors
  • POST /api/t/<slug>/connectors — body: { kind, displayName, credentials }
  • POST /api/t/<slug>/connectors/<connectorId>/test
  • GET /api/t/<slug>/knowledge-sources
  • POST /api/t/<slug>/knowledge-sources — bulk; body: { connectorId, items: [{ sourceType, sourceRef, displayName, audience, settings? }] }. Returns 200 (mixed success) or 422 (all-failed) with { results: [{ ok, code?, message? }] }.
  • GET /api/t/<slug>/connectors/<id>/resources?withStatus=1 — source-picker snapshot read; addedSource is non-null for already-selected rows.
  • POST /api/t/<slug>/knowledge-sources/<id>/sync
  • DELETE /api/t/<slug>/knowledge-sources/<id> — admin/owner. Soft-deletes the source and purges its chunks. Idempotent { ok: true, alreadyDeleted?: true }. The connector stays connected.

Skills

  • GET /api/t/<slug>/skills — first-party playbook catalog with enabled and eligible flags. Any member.
  • PATCH /api/t/<slug>/skills/<skillId> — body: { enabled }. Admin/owner. Missing row means enabled (default on).

API keys

  • GET /api/t/<slug>/api-keys
  • POST /api/t/<slug>/api-keys — body: { name } — token is returned once
  • DELETE /api/t/<slug>/api-keys/<id>

Audit log

  • GET /api/t/<slug>/audit-log — filters: action (exact), q (matches the action name or its label), category, outcome (success | failure | denied), actorUserId, resourceType, resourceId, from, to. Paginate with limit + offset, or follow page.nextCursor for a stable keyset walk.
  • GET /api/t/<slug>/audit-log?format=csv (or format=ndjson) — streams every event matching the same filters, not just the current page. Business plan and above; other tiers get 402.
  • GET /api/t/<slug>/audit-log/actions — the distinct actions present in this workspace, with human labels.

GDPR export & delete

  • GET /api/t/<slug>/export — returns a single JSON document with every record we hold for the tenant. Owner role only.
  • POST /api/t/<slug>/delete — body: { confirm: "<slug>" }. Schedules a 30-day deletion grace period.

Rate limits

Two layers. The admin console API is a fleet ceiling of 300 req/min per authenticated user (env RATE_LIMIT_AUTHED_MAX). MCP tool calls are additionally capped per plan: Free 30, Team 120, Business 600, Enterprise 6 000 req/min. Hits return 429 with Retry-After seconds.

Errors

All errors are JSON: { error: { code, message, details? } }. Common codes: not_authenticated, not_authorized, not_found, quota_exceeded, validation_error.