Core tenant endpoints are [User+Key]. API keys need the scope shown below and remain limited to their environment and tenant allowlist. Durable-memory administration is [User] only.
Endpoints
For user sessions,
owner and billing_admin can create, update, and delete tenants. API keys use scopes instead of organization roles. See Tenancy and Access & scopes.
List tenants
GET /tenants
Returns tenants with knowledge-base, document, and storage usage counts.
string
Environment to list. Required for a user session. With an API key, omit it to use the key’s environment; if supplied, it must match that environment.
A key with
admin:full lists every tenant in its environment even when tenant_ids contains explicit IDs. Use explicit permission scopes instead of admin:full when tenant-level discovery must remain restricted.Get a tenant
GET /tenants/:id
Returns the tenant’s configuration together with knowledge-base count, document count, and storage used.
string
required
Tenant ID.
Create a tenant
POST /tenants
string
required
Environment that will own the tenant.
string
required
Tenant display name.
string
Stable identifier from your application, such as a customer or workspace ID.
string
Human-readable name from your application.
number
Credits to allocate from the organization to this tenant. Must be non-negative and cannot exceed the organization’s available credits.
number
Maximum knowledge bases allowed for the tenant.
number
Maximum documents allowed for the tenant.
number
Maximum tenant storage in gigabytes.
object
Application-defined metadata.
Update a tenant
PATCH /tenants/:id
Updates any supplied tenant fields. Accepted fields are name, external_id, external_name, credits_pool, max_knowledge_bases, max_documents, max_storage_gb, and metadata.
string
required
Tenant ID.
Delete a tenant
DELETE /tenants/:id
Deletes the tenant and the knowledge bases, documents, chats, agents, and other data it owns. Credit allocation is reconciled with the organization.
string
required
Tenant ID.
Durable memory
Memory management endpoints require a user session. Any organization member can read settings, memories, and the entity graph; onlyowner and billing_admin can change settings or delete a memory.
Get memory settings
GET /tenants/:id/memory-settings
Returns the resolved mode and retention settings.
string
required
Tenant ID.
Update memory settings
PATCH /tenants/:id/memory-settings
string
required
Tenant ID.
string
disabled or durable.string
none, explicit_only, or automatic. explicit_only stores facts only when a user explicitly asks AutoSage to remember them; automatic also retains useful context after conversations.List memories
GET /tenants/:id/memories
string
required
Tenant ID.
number
Maximum number of memories to return.
number
Number of memories to skip.
string
Search text used to filter memories.
Delete a memory
DELETE /tenants/:id/memories/:memoryId
string
required
Tenant ID.
string
required
Memory ID returned by the list endpoint.
Get the entity graph
GET /tenants/:id/memories/graph
Returns the entities and relationships extracted from durable memory. Tenants without active durable memory return an empty graph.
See Durable memory for recall, retention, and knowledge-base isolation behavior.
Next steps
Tenancy model
Design secure customer and environment boundaries.
Billing & usage
Inspect credits and usage for each tenant.
Knowledge bases
Create content containers inside a tenant.