POST
/v1/mgmt/tenant/create/batchAuthorization
Descope Project ID and Management Key AuthorizationBearer <token>
Project ID:Management Key as bearer token.
In: header
Request Body
application/json
tenants*array<CreateTenantRequest>
Items
1 <= itemsCreate multiple tenants in a single batch, using a valid management key. Each tenant is created independently; per-tenant failures are returned in the response body.
curl -X POST "https://api.descope.com/v1/mgmt/tenant/create/batch" \ -H "Content-Type: application/json" \ -d '{ "tenants": [ { "name": "string" } ] }'{ "createdTenants": [ { "id": "string", "name": "string" } ], "failedTenants": [ { "failure": "string", "tenant": { "name": "string", "id": "string", "selfProvisioningDomains": [ "string" ], "customAttributes": { "attribute-key": "attribute-value" }, "authType": "string", "disabled": true, "enforceSSO": true, "enforceSSOExclusions": [ "string" ], "federatedAppIds": [ "string" ], "parent": "string", "roleInheritance": "string", "approvedDomains": [ "string" ], "enforceSSOExclusionPermissions": [ "string" ] } } ], "additionalErrors": { "property1": "string", "property2": "string" }}export interface Response {createdTenants?: CreatedTenantResponse[]failedTenants?: CreateTenantBatchFailureResponse[]additionalErrors?: {[k: string]: string}}export interface CreatedTenantResponse {id?: stringname?: string}export interface CreateTenantBatchFailureResponse {failure?: stringtenant?: {name: stringid?: stringselfProvisioningDomains?: string[]/** * Custom attributes as key-value pairs. Keys must be strings; values can be strings, numbers, booleans, or arrays. */customAttributes?: {[k: string]: string}authType?: stringdisabled?: booleanenforceSSO?: booleanenforceSSOExclusions?: string[]federatedAppIds?: string[]parent?: stringroleInheritance?: string/** * The tenant's vanity hostname (e.g. surveys.example.com), unique across the project's tenants. Requests that reach the project through its trusted proxy on this hostname are bound to this tenant. One item for now * * @maxItems 1 */approvedDomains?: []|[string]/** * Permission names or IDs whose holders in the tenant may sign in without SSO while enforceSSO is on (break-glass accounts) */enforceSSOExclusionPermissions?: string[]}} Was this helpful?