Python SDK
Tenants
Learn how to create, update, fetch, & list tenants using Python SDK.
Tenants (previously named as brands) are used for white labeling notifications, personalizing template content or capturing admin preferences for another entity/organization. Tenants are workspace-level entities and by default, a tenant with tenant_id="default"
(representing your organization) is created your workspace. Read more about tenants here.
Create / Update tenant
Field | Description |
---|---|
tenant_id (mandatory) | Unique identifier for the tenant (max 64 characters, case insenstive). It can contain characters [a-z0-9_\-] that is alphanumeric characters, \_(underscore) and -(hyphen). |
tenant_name (*mandatory) | Tenant’s display name in a human-readable format |
logo | Logo URL, used in email headers or on hosted preference page for per-tenant branding. |
primary_color, secondary_color, tertiary_color | Tenant branding colors- used in template design or hosted preference page for per-tenant branding. |
timezone | The primary timezone for most tenants’ recipients. Used as a fallback when sending notifications in the recipient’s timezone and timezone is not set in recipient profile. |
blocked_channels | These channels will be skipped for sending notification to recipients when triggering for this tenant. Used to apply channel level opt-outs at admin level. |
social_links | URLs of the tenant’s social media accounts. |
embedded_preference_url | |
properties | Custom properties of the tenant like address, to be used in template or workflow. |
All properties of the tenant can be referred as {{$brand.prop}}
(handlebars) or data\["tenant"\].prop
in JSONNET format.
Get tenant
List tenants
By default, limit=20
. The maximum value for limit
is 1000
.