Node.js SDK
Tenants
Learn how to create, update, fetch, & list tenants using NodeJS 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
This method will create a new tenant or update an existing tenant.
Field | Description |
---|---|
tenant_id (mandatory) | max 64 characters and should contains alphanumeric characters(a-z, 0-9), hyphen (-) and underscode(_). |
tenant_name (mandatory) | name of the tenant. |
colors (primary, secondary, tertiary) | used while designing templates. If not provided default tenant colour will be picked. |
social_links | social links to your tenant. Pass "" if you want to remove existing link. |
properties | Custom properties associated with the tenant. Update operation is upsert (new properties are added to existing one’s and if key is already present, value is overridden). |
All properties of the tenant can be referred as {{$tenant.prop}}
(handlebars) or data["tenant"].prop
in JSONNET format.
Get tenant
List tenants
By default, limit=20
. The maximum value for limit
is 1000
.