Brume · Docs
API

Administration

Référence OpenAPI générée pour le domaine « Administration ».

GET
/api/admin/audit-events

Return the tenant's fixed 30-day Community audit journal.

Query Parameters

from?string|null
to?string|null
action?string|null
actor_user_id?string|null
snapshot_seq?integer|null
before_seq?integer|null
limit?integer
Default25

Response 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}
GET
/api/admin/audit-events/{event_id}

Return one tenant-scoped event from the Community visible window.

Path Parameters

event_id*string

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"}
GET
/api/admin/invitations

Return pending and accepted invitations to member managers.

Response Body

application/json

curl -X GET "https://example.com/api/admin/invitations"
[  {}]
POST
/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 '{}'
{}
DELETE
/api/admin/invitations/{invitation_id}

Revoke a pending invitation and delete its pending private workspace.

Path Parameters

invitation_id*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/admin/invitations/string"
{}
DELETE
/api/admin/invitations/{invitation_id}/workspaces/{workspace_id}

Remove one workspace assignment while preserving a valid pending invitation.

Path Parameters

invitation_id*string
workspace_id*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/admin/invitations/string/workspaces/string"
{}
GET
/api/admin/members

Return tenant memberships to users allowed to manage members.

Response Body

application/json

curl -X GET "https://example.com/api/admin/members"
[  {}]
PATCH
/api/admin/members/{member_user_id}

Update a member's role or status and record the resulting audit events.

Path Parameters

member_user_id*string

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 '{}'
{}
DELETE
/api/admin/members/{member_user_id}

Remove a tenant membership unless it belongs to the last active admin.

Path Parameters

member_user_id*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/admin/members/string"
{}
POST
/api/admin/members/{member_user_id}/private-workspace

Create a private workspace for a member who doesn't have one.

Path Parameters

member_user_id*string

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 '{}'
{}
GET
/api/admin/role-settings

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
/api/admin/role-settings

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": {}}
GET
/api/admin/tenant

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  }}
PATCH
/api/admin/tenant

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"}
GET
/api/admin/usage/by-workspace

Return tenant usage costs grouped by workspace for authorized viewers.

Query Parameters

from?string|null
to?string|null

Response Body

application/json

application/json

curl -X GET "https://example.com/api/admin/usage/by-workspace"
[  {}]
GET
/api/admin/usage/summary

Return aggregate tenant usage and cost totals for a requested time range.

Query Parameters

from?string|null
to?string|null

Response Body

application/json

application/json

curl -X GET "https://example.com/api/admin/usage/summary"
{}
GET
/api/admin/usage/timeseries

Return bucketed tenant usage costs and execution counts over time.

Query Parameters

from?string|null
to?string|null

Response Body

application/json

application/json

curl -X GET "https://example.com/api/admin/usage/timeseries"
{}
GET
/api/admin/workspaces

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"  }]
POST
/api/admin/workspaces/pending

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 '{}'
{}