Create Tenant

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates a new tenant.

Required Permissions

Below is the list of required permissions needed to interact with this API. For each permission, the allowed permission boundaries are also specified.

PermissionBoundaryDescription
tenant:createApplicationThe subject can create tenants within the application associated with the subject.
Body Params

Tenant resource

Tenant

string
enum
length between 1 and 45
Defaults to STANDARD

The type of the tenant. For most B2B use cases the STANDARD type should be used. Tenants with a type of STANDARD typically correspond to organizations of a B2B application. Users can be stored under each tenant providing user isolation across tenants.

Tenants of type GLOBAL are meant to store users that are not associated to any specific organization. This can be useful for storing consumer users. When users log in or sign up to a global tenant, any references to tenant information will be removed from the wording, creating a consumer like log in or sign up experience. Note, only one global tenant can exist per application.

Tenants of type STANDALONE can be used to provide a completely white-labeled experience. For stand-alone tenants, any language regarding the application is removed from the UI - only the tenant's information will be displayed. Likewise, any links for navigating between tenants on login pages will be removed. There's no restriction on the number of stand-alone tenants that can be created for an application.

Allowed:
string
length between 3 and 20
^[a-zA-Z0-9]+(-+[a-zA-Z0-9]+)*$
deprecated

Deprecation Notice: This field has been replaced by the name field and should no longer be used. In the future, this field may be removed.

Name of the tenant. The name must be unique (case-insensitive) within an application.

string
length between 3 and 20
^[a-zA-Z0-9]+(-+[a-zA-Z0-9]+)*$

[Required on Create] Name of the tenant. The name must be unique (case-insensitive) within an application.

string
length between 1 and 60

[Required on Create] A friendly name given to a tenant for display purposes.

string
length between 1 and 500

Description of the tenant.

uri
length between 1 and 2000

URL pointing to an image of the tenant's logo. This URL MUST refer to an image file (for example, a PNG, JPEG, or GIF image file).

boolean
Defaults to false

Boolean indicating whether signup is enabled for a tenant.

allowedSignupEmailDomains
array of strings
length ≤ 10

List of email domains that can be used to restrict which emails a user can use when signing up with a tenant. If the list is empty then all emails are permitted.

allowedSignupEmailDomains
discoveryEmailDomains
array of strings
length ≤ 10

List of email domains that will be used during the tenant discovery process to map users to their respective tenants. This value must be empty for tenants of type GLOBAL.

discoveryEmailDomains
restrictedMetadata
object

Allows for storing custom metadata that should only be modifiable by authenticated subjects with the tenant:manage-restricted-metadata permission. Conceptually, the restricted metadata is meant to store custom attributes that end users should not be able to modify, for example, internal identifiers. The following restrictions apply to this field:

  • The max size of the JSON is 4KB
  • The max nesting depth is 3
  • The max number of top level fields within an object is 15
  • Field names must abide by the following regex: ^[a-zA-Z]([-_]?[a-zA-Z0-9]+)*$
  • Directly nesting arrays within each other is not permitted. For example the following value is not allowed: [[1, 2], [4,5]]
    The object fields are case-insensitive and if duplicate field names are provided then the last value written will win.

Fields can be deleted by assigning them a value of null. Likewise, all fields can be deleted by setting the restrictedMetadata field to null.

publicMetadata
object

Allows for storing custom metadata that should be readable and modifiable by end users. Unlike the restrictedMetadata field, the public metadata does not require any extra permissions to modify. The following restrictions apply to this field:

  • The max size of the JSON is 4KB
  • The max nesting depth is 3
  • The max number of top level fields within an object is 15
  • Field names must abide by the following regex: ^[a-zA-Z]([-_]?[a-zA-Z0-9]+)*$
  • Directly nesting arrays within each other is not permitted. For example the following value is not allowed: [[1, 2], [4,5]]
    The object fields are case-insensitive and if duplicate field names are provided then the last value written will win.

Fields can be deleted by assigning them a value of null. Likewise, all fields can be deleted by setting the publicMetadata field to null.

string
enum
length between 1 and 45
Defaults to ACTIVE

The status of the tenant.

Allowed:
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json