Reference > SDK > Tenant Manager
Tenant Manager SDK Reference
API reference for the Tenant Manager SDK — methods for managing tenants.
- What methods are available on
sdk.tenantManager? - What parameters each method accepts?
- What each method returns?
See Using the Webiny SDK for end-to-end usage examples.
Overview
The TenantManagerSdk is accessed via sdk.tenantManager on a Webiny instance. It provides methods for creating, installing, enabling, and disabling tenants in a multi-tenant Webiny setup. All methods return a Result type — see the SDK overview for initialization and error handling details.
Methods
createTenant
Creates a new tenant in the system.
Signature:
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
data | CreateTenantInput | Yes | The tenant data to create |
installTenant
Installs and provisions a tenant with default settings and configurations.
Signature:
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
tenantId | string | Yes | ID of the tenant to install |
disableTenant
Disables a tenant, preventing access to its resources.
Signature:
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
tenantId | string | Yes | ID of the tenant to disable |
enableTenant
Re-enables a previously disabled tenant.
Signature:
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
tenantId | string | Yes | ID of the tenant to enable |
getCurrentTenant
Returns the current tenant for the authenticated context.
Signature:
This method takes no parameters.