Access and members
Tenant membership and access requests.
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
""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" }]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
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" }]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
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 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
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/tenants/string/api-keys/string"{ "property1": "string", "property2": "string"}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
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" }]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
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"}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
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/tenants/string/invitations/string"{}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
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" }]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
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"}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
Response Body
application/json
application/json
curl -X DELETE "https://example.com/api/tenants/string/members/string"{ "property1": "string", "property2": "string"}