Create / Update Tenants

Changed on

API to create a new Tenant OR update an existing Tenant

post/v1/tenant/{tenant_id}/

Request

Path parameters

tenant_idstring required

Tenant identifier to create or update. Max 64 chars; allowed characters [a-zA-Z0-9_.-] (converted to lowercase unless case-sensitive IDs are enabled for your organization).

Request body

namestring required

Tenant display name. Replaces the legacy tenant_name field; both are accepted.

tenant_namestring

Will be deprecated in future. Use name instead.

parent_idstring nullable

ID of the parent tenant if you want to add this tenant as a sub-tenant. Skip this field, or pass null or "" to create the tenant as a root. Setting it on an existing tenant re-parents it or leave it null to delink existing parent. Must reference an existing tenant. See Sub-tenants.

blocked_channelsstring[] nullable

Channels turned off for this tenant. Notifications on these channels won't be sent to any user of the tenant — including on root categories (which users normally can't unsubscribe from) — and users can't override this. If sub-tenants are used, a block set here also applies to every sub-tenant below and can't be removed lower down. Allowed: email, sms, whatsapp, androidpush, iospush, webpush, slack, ms_teams, inbox.

logostring

Tenant logo URL.

primary_colorstring

Primary brand color, used in the tenant's email header, buttons, and footer. If left empty when creating a root tenant, it's set to SuprSend's default (#777777).

secondary_colorstring

Secondary brand color. Not part of the default tenant component but can be used in templates as {{$tenant.secondary_color}}. If both secondary and tertiary colors are left empty when creating a root tenant, they're copied from the default tenant.

tertiary_colorstring

Tertiary brand color. Not part of the default tenant component but can be used in templates as {{$tenant.tertiary_color}}. If both secondary and tertiary colors are left empty when creating a root tenant, they're copied from the default tenant.

embedded_preference_urlstring

URL of your product's preference page.

propertiesobject

Custom tenant properties. Merged per top-level key on update — keys not in the payload are kept as-is.

Example request

{
  "parent_id": "acme-corp",
  "blocked_channels": [
    "sms"
  ],
  "secondary_color": "#00ff00",
  "tertiary_color": "#0000ff"
}

Response

201 - Created

object required

Tenant object returned. Fields hold the tenant's own local values — values not set on this tenant come back as null (or as empty objects/arrays). For flat tenants (no sub-tenants), unset fields stay unresolved and the tenant simply has no value for them. For sub-tenants, unset fields still return null here, but are resolved from the closest ancestor that has a value set at trigger time.

Changes

    • warning

      changed the pattern of the path request parameter tenant_id from ^[a-z0-9_.-]+$ to ^[a-zA-Z0-9_.-]+$

    • warning

      removed the request property

    • warning

      removed the request property /

    • info

      added the new optional request property

    • info

      added the new optional request property /

    • breaking

      added the pattern ^[a-z0-9_.-]+$ to the path request parameter tenant_id

    • warning

      for the path request parameter tenant_id, the maxLength was set to 64

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the new required request property with a default value

    • info

      the request property became optional

    • info

      the request property default value Awesome Tenant was removed