Tenant Manager > Extend Tenant Model
Extend the Tenant Model
Learn how to add custom fields to the tenant model
- How to add custom fields to the tenant model
The TenantModelExtension allows you to add custom fields to the Tenant model. These fields are stored under the tenant.extensions object — you cannot add fields to the root of the model. Once added, these fields automatically appear in the Tenant form in the Admin UI, as well as in the GraphQL schema.
Create an Extension
Import the TenantModelExtension and implement the execute method. The extension parameter provides two methods: fields() and layout().
Register Your Extension
Register your extension in webiny.config.tsx:
How It Works
The Tenant model has an extensions field. Every TenantModelExtension implementation adds its fields as nested fields within that extensions object. This means:
- Your fields are stored at
tenant.extensions.yourFieldName. - You cannot add fields to the root of the Tenant model — only inside
extensions. - All fields added via extensions automatically render in the Tenant form in the Admin UI, and are added to the GraphQL schema.
For all the available field types, visit a dedicated article on CMS model fields.