client.tenants¶
Bases: SyncResource
Sync tenants namespace (client.tenants).
health ¶
Probe API liveness. Returns HealthStatus(status="ok") when up.
Unauthenticated and not tenant-scoped; safe to call before any workspace exists.
create ¶
create(*, slug: str, name: str, owner: dict[str, Any], bootstrap_secret: str | None = None) -> Tenant
Provision a new workspace and its owner account (OPERATOR-only; 201).
Requires the deployment's bootstrap secret (ADR-0116) — pass it here or
set SUPERB_AI_BOOTSTRAP_SECRET. Without it the endpoint answers 404
for everyone (fail-closed). Regular users create workspaces in-app via
:meth:Account.create_tenant after signing up.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
slug
|
str
|
URL-safe unique id — lowercase alphanumeric with single hyphens
(e.g. |
required |
name
|
str
|
human-readable display name. |
required |
owner
|
dict[str, Any]
|
the initial owner account — a dict with |
required |
bootstrap_secret
|
str | None
|
operator secret; falls back to the
|
None
|
Raises:
| Type | Description |
|---|---|
NotFoundError
|
missing/wrong bootstrap secret (the gate is indistinguishable from a missing route by design). |
ConflictError
|
the slug is already taken (TENANT_SLUG_TAKEN). |
UnprocessableError
|
invalid slug/name/owner (e.g. reserved slug, malformed email, password below the minimum length). |
Response models¶
Models returned by client.tenants methods (fields, types, and what each means).