Administration
Tenant administration: members, roles and settings.
Return the tenant's fixed 30-day Community audit journal.
Query Parameters
25Response Body
application/json
application/json
curl -X GET "https://example.com/api/admin/audit-events"{ "events": [ { "action": "string", "actor_name": "string", "actor_user_id": "string", "event_id": "string", "outcome": "string", "recorded_at": "string", "seq": 0, "target_type": "string" } ], "members": [ { "id": "string", "name": "string" } ], "next_cursor": 0, "retention_days": 30, "snapshot_seq": 0}Return one tenant-scoped event from the Community visible window.
Path Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/api/admin/audit-events/string"{ "action": "string", "actor_name": "string", "actor_user_id": "string", "event_id": "string", "metadata": { "property1": null, "property2": null }, "occurred_at": "string", "outcome": "string", "recorded_at": "string", "seq": 0, "target_id": "string", "target_type": "string", "workspace_id": "string"}curl -X GET "https://example.com/api/admin/invitations"[ {}]Create or merge an invitation, assign workspaces, and optionally send email.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/admin/invitations" \ -H "Content-Type: application/json" \ -d '{}'{}Revoke a pending invitation and delete its pending private workspace.
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/admin/invitations/string"{}Remove one workspace assignment while preserving a valid pending invitation.
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/admin/invitations/string/workspaces/string"{}curl -X GET "https://example.com/api/admin/members"[ {}]Update a member's role or status and record the resulting audit events.
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/api/admin/members/string" \ -H "Content-Type: application/json" \ -d '{}'{}Remove a tenant membership unless it belongs to the last active admin.
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/admin/members/string"{}Create a private workspace for a member who doesn't have one.
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/admin/members/string/private-workspace" \ -H "Content-Type: application/json" \ -d '{}'{}Return the merged role settings for the tenant.
Always returns a complete payload — factory defaults overlaid with the tenant's customizations. The frontend never has to distinguish "never customized" from "customized identically to defaults".
Admin-only: any non-admin tenant member receives 403.
Response Body
application/json
curl -X GET "https://example.com/api/admin/role-settings"{ "property1": {}, "property2": {}}Patch label/color/permissions for non-admin roles.
Body shape (all fields optional, per role): { "user": { "label"?, "color"?, "permissions"? }, "power_user": { "label"?, "color"?, "permissions"? } }
The endpoint reads the current tenants.role_settings, merges the
validated patch on top, and writes back. Fields not present in the
payload are preserved — both pages (Roles & White-Label) can therefore
share this endpoint without erasing each other's writes.
Admin-only.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/api/admin/role-settings" \ -H "Content-Type: application/json" \ -d '{}'{ "property1": {}, "property2": {}}Return tenant branding and theme settings to authorized administrators.
Response Body
application/json
curl -X GET "https://example.com/api/admin/tenant"{ "brand_name": "string", "dark_theme": { "property1": null, "property2": null }, "favicon_url": "string", "logo_url": "string", "name": "string", "theme": { "property1": null, "property2": null }}Update tenant names, enforcing white-label entitlement for brand changes.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/api/admin/tenant" \ -H "Content-Type: application/json" \ -d '{}'{ "property1": "string", "property2": "string"}Return tenant usage costs grouped by workspace for authorized viewers.
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/api/admin/usage/by-workspace"[ {}]Return aggregate tenant usage and cost totals for a requested time range.
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/api/admin/usage/summary"{}Return bucketed tenant usage costs and execution counts over time.
Query Parameters
Response Body
application/json
application/json
curl -X GET "https://example.com/api/admin/usage/timeseries"{}Return workspace administration metrics to users with admin-view access.
Response Body
application/json
curl -X GET "https://example.com/api/admin/workspaces"[ { "api_key_source": "string", "budget_usd": 0, "connector_count": 0, "custom_skills": {}, "id": "string", "invitation_email": "string", "is_private": false, "lang": "string", "logo_url": "string", "member_count": 0, "name": "string", "owner": { "has_avatar": true, "id": "string", "name": "string" }, "owner_name": "string", "slug": "string", "spent_usd": 0, "status": "string", "visibility": "tenant" }]Create a pending private workspace (for linking to an invitation).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/admin/workspaces/pending" \ -H "Content-Type: application/json" \ -d '{}'{}