Passer au contenu principal
POST
https://{teamSlug}.teams.auth0.com
/
api
/
tenants
Create a tenant under the current team
curl --request POST \
  --url https://{teamSlug}.teams.auth0.com/api/tenants \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "admin_email": "jsmith@example.com",
  "locality": "<string>",
  "tenant_name": "<string>",
  "environment_tag": "development"
}
'
{
  "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tenant_name": "<string>",
  "domain": "<string>",
  "locality": "<string>",
  "environment": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "management_client": {
    "client_name": "<string>",
    "client_id": "<string>",
    "client_secret": "<string>"
  },
  "environment_tag": "development"
}

Documentation Index

Fetch the complete documentation index at: https://docs-dev.auth0-mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

application/json

Create a tenant under the current team

admin_email
string<email>
requis

The email of the person that will be added as an admin of the tenant. The person must be a member of the team.

locality
string
requis

Specifies the Auth0 Public Cloud locality where the tenant will be created.
Available localities include United States (us), Europe (eu), Australia (au), Japan (jp), Canada (ca) and United Kingdom (uk).

Required string length: 2 - 5
Exemples:

"us"

"eu"

"au"

"jp"

"ca"

"uk"

tenant_name
string

The tenant name uniquely identifies a tenant programmatically and within various dashboards, such as Auth0 Dashboard. It can only contain alphanumeric characters, lowercase letters and "-". However, it can't start nor end with "-". If not specified, a tenant name will be auto-generated.

Required string length: 3 - 63
Pattern: ^[a-z0-9][-a-z0-9]{1,62}[a-z0-9]$
Exemple:

"acme-development-tenant"

environment_tag
enum<string>
défaut:development

Specifies the Environment tag for the tenant created in the Auth0 Public Cloud. It is used to distinguish between development, staging and production environments.
Development and Staging environments are intended for testing and pre-production use, while production is designated for live applications and subject to higher rate limits. Selecting the correct environment type ensures appropriate resource allocation and rate limits

Options disponibles:
development,
production,
staging
Exemple:

"development"

Réponse

Tenant Created

tenant_id
string<uuid>
requis

The unique identifier of the created tenant (UUID). This identifier is required for performing operations such as deleting the tenant. UUIDs ensure global uniqueness and are essential for managing tenant resources programmatically

Exemple:

"538c9e21-e3d5-4ad6-b3d0-352c62369fb0"

tenant_name
string
requis

The tenant name uniquely identifies a tenant programmatically and within various dashboards, such as Auth0 Dashboard. It can only contain alphanumeric characters, lowercase letters and "-". However, it can't start nor end with "-". If not specified, a tenant name will be auto-generated.

Required string length: 3 - 63
Pattern: ^[a-z0-9][-a-z0-9]{1,62}[a-z0-9]$
Exemple:

"acme-development-tenant"

domain
string
requis

The fully qualified domain name of the tenant, which uniquely identifies its domain within the system. The domain is used to define the audience when interacting with the Management API, enabling programmatic management of the tenant’s configuration and resources.

Exemples:

"acme-development-tenant.us.auth0.com"

"acme-development-tenant.acme-dev.auth0app.com"

locality
string
requis

Locality in which the tenant was created

Exemples:

"us"

"eu"

"virginia"

"frankfurt"

environment
string
requis

The name of the cloud environment where the tenant was created

Exemples:

"US-3"

"EU-1"

"acme-dev"

created_at
string<date-time>
requis

The date and time when the tenant was created, formatted in ISO 8601 standard. This timestamp ensures consistency across time zones and systems

management_client
object
requis

The Auth0 Management Client credentials required to authenticate and interact with the newly created tenant. These credentials allow authorized access to manage the tenant's configuration, resources, and API interactions.

environment_tag
enum<string>

Specifies the Environment tag for the tenant created in the Auth0 Public Cloud. It is used to distinguish between development, staging and production environments.
Development and Staging environments are intended for testing and pre-production use, while production is designated for live applications and subject to higher rate limits. Selecting the correct environment type ensures appropriate resource allocation and rate limits

Options disponibles:
development,
production,
staging
Exemple:

"development"