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
| Method | Path | Description | Auth |
|---|---|---|---|
GET | /tenants?env_id= | List tenants in an environment | [User+Key] tenants:read |
GET | /tenants/:id | Get a tenant and usage counts | [User+Key] tenants:read |
POST | /tenants | Create a tenant | [User+Key] tenants:write |
PATCH | /tenants/:id | Update a tenant | [User+Key] tenants:write |
DELETE | /tenants/:id | Delete a tenant | [User+Key] tenants:delete |
GET | /tenants/:id/memory-settings | Get durable-memory settings | [User] |
PATCH | /tenants/:id/memory-settings | Update durable-memory settings | [User] admin |
GET | /tenants/:id/memories | List durable memories | [User] |
DELETE | /tenants/:id/memories/:memoryId | Delete a durable memory | [User] admin |
GET | /tenants/:id/memories/graph | Get the memory entity graph | [User] |
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.
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.
Tenant ID.
Create a tenant
POST /tenants
Environment that will own the tenant.
Tenant display name.
Stable identifier from your application, such as a customer or workspace ID.
Human-readable name from your application.
Credits to allocate from the organization to this tenant. Must be non-negative and cannot exceed the organization’s available credits.
Maximum knowledge bases allowed for the tenant.
Maximum documents allowed for the tenant.
Maximum tenant storage in gigabytes.
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.
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.
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.
Tenant ID.
Update memory settings
PATCH /tenants/:id/memory-settings
Tenant ID.
disabled or durable.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
Tenant ID.
Maximum number of memories to return.
Number of memories to skip.
Search text used to filter memories.
Delete a memory
DELETE /tenants/:id/memories/:memoryId
Tenant ID.
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.