Brume · Docs
API

Accès et membres

Référence OpenAPI générée pour le domaine « Accès et membres ».

GET
/api/tenants/members/search

Return matching members, pending invites, and email-based invite candidates.

This read-only tenant-scoped search requires active tenant membership and raises PermissionDeniedException when tenant context or membership is missing. Database errors propagate to the caller.

Query Parameters

q?string
Default""

Response Body

application/json

application/json

curl -X GET "https://example.com/api/tenants/members/search"
[  {    "email": "string",    "has_avatar": true,    "name": "string",    "role": "string",    "type": "user",    "user_id": "string"  }]
GET
/api/tenants/{path_tenant_id}/api-keys

List tenant-scoped provider key metadata without exposing secrets.

Requires API-key management permission. Returns identifiers, providers, hints, and update timestamps for keys stored directly on the tenant.

Path Parameters

path_tenant_id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/tenants/string/api-keys"
[  {    "id": "string",    "key_hint": "string",    "provider": "string",    "source": "string",    "updated_at": "string"  }]
POST
/api/tenants/{path_tenant_id}/api-keys

Store, probe, or rotate a tenant-scoped provider credential.

Requires API-key management permission and enabled BYOK. The operation emits audit events, refreshes credential-dependent caches and routing, and requeues provider health checks. Probe failures are returned without rejecting the stored key; disabled BYOK still raises a validation error.

Path Parameters

path_tenant_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/tenants/string/api-keys" \  -H "Content-Type: application/json" \  -d '{    "key": "string",    "provider": "string"  }'
{  "key_hint": "string",  "provider": "string",  "status": "string",  "valid": true}
DELETE
/api/tenants/{path_tenant_id}/api-keys/{provider}

Delete a tenant-scoped provider credential.

Requires API-key management permission, emits a revocation audit event, and requeues provider health checks. Raises not found when no matching tenant credential exists.

Path Parameters

provider*string
path_tenant_id*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/tenants/string/api-keys/string"
{  "property1": "string",  "property2": "string"}
GET
/api/tenants/{path_tenant_id}/invitations

List pending and accepted invitations for a tenant.

Requires member-management permission and returns invitations in reverse creation order without changing tenant state. Authorization and invalid tenant identifier errors propagate to the caller.

Path Parameters

path_tenant_id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/tenants/string/invitations"
[  {    "created_at": "string",    "email": "string",    "id": "string",    "role": "string",    "status": "string",    "token": "string"  }]
POST
/api/tenants/{path_tenant_id}/invitations

Create an invitation for a tenant member.

Requires member-management permission. Persists the invitation and workspace assignments, immediately activates existing users, records audit events, and sends the applicable email unless suppressed. Returns 409 when a pending invitation already exists; authorization and invalid identifier errors propagate from the underlying services.

Path Parameters

path_tenant_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/tenants/string/invitations" \  -H "Content-Type: application/json" \  -d '{    "email": "string"  }'
{  "created_at": "string",  "email": "string",  "email_sent": true,  "id": "string",  "invite_url": "string",  "role": "string",  "status": "string",  "token": "string"}
DELETE
/api/tenants/{path_tenant_id}/invitations/{invitation_id}

Revoke a pending invitation belonging to the tenant.

Requires member-management permission. Marks a matching invitation as revoked, removes its pending private workspace, and records audit events; missing or non-pending invitations are treated as a no-op. Authorization and invalid identifier errors propagate to the caller.

Path Parameters

path_tenant_id*string
invitation_id*string

Response Body

application/json

application/json

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

List tenant members with overrides and effective permissions.

Requires tenant admin-view access and performs no writes. Invalid identifiers and authorization or database failures propagate through the API error layer.

Path Parameters

path_tenant_id*string

Response Body

application/json

application/json

curl -X GET "https://example.com/api/tenants/string/members"
[  {    "effective_permissions": {},    "email": "string",    "has_avatar": false,    "joined_at": "string",    "name": "string",    "permission_overrides": {},    "role": "string",    "status": "string",    "user_id": "string"  }]
PATCH
/api/tenants/{path_tenant_id}/members/{member_user_id}

Update a tenant member's role or status and emit audit events.

Requires member-management access and applies supplied fields atomically. An empty update is rejected; invalid identifiers, authorization failures, and database errors propagate through the API error layer.

Path Parameters

path_tenant_id*string
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/tenants/string/members/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "property1": "string",  "property2": "string"}
DELETE
/api/tenants/{path_tenant_id}/members/{member_user_id}

Remove a tenant member and their private workspace atomically.

Requires member-management access and emits audit events for successful deletions. Removing the last active admin is rejected; invalid identifiers, authorization failures, and database errors propagate through the API layer.

Path Parameters

path_tenant_id*string
member_user_id*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/api/tenants/string/members/string"
{  "property1": "string",  "property2": "string"}