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 aomcp_… 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/t/<slug>/whoami — returns the authenticated user, the resolved tenant, and the membership role.
Members
GET /api/t/<slug>/membersPOST /api/t/<slug>/invites— body:{ emails, role }PATCH /api/t/<slug>/members/<userId>/role— body:{ role }(owner-only for theownerrole)POST /api/t/<slug>/members/<userId>/reactivate— restore a suspended memberDELETE /api/t/<slug>/members/<userId>— suspend (soft-remove) a member
Groups
GET /api/t/<slug>/groupsPOST /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>/connectorsPOST /api/t/<slug>/connectors— body:{ kind, displayName, credentials }POST /api/t/<slug>/connectors/<connectorId>/testGET /api/t/<slug>/knowledge-sourcesPOST /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;addedSourceis non-null for already-selected rows.POST /api/t/<slug>/knowledge-sources/<id>/syncDELETE /api/t/<slug>/knowledge-sources/<id>
API keys
GET /api/t/<slug>/api-keysPOST /api/t/<slug>/api-keys— body:{ name }— token is returned onceDELETE /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 withlimit+offset, or followpage.nextCursorfor a stable keyset walk.GET /api/t/<slug>/audit-log?format=csv(orformat=ndjson) — streams every event matching the same filters, not just the current page. Business plan and above; other tiers get402.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
Admin API is limited per plan (Free 60 req/min, Starter 300, Growth 1500, Enterprise custom). 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.