ApiManagementTenants
POST
/v1/mgmt/tenant/create/batch

Authorization

Descope Project ID and Management Key
AuthorizationBearer <token>

Project ID:Management Key as bearer token.

In: header

Request Body

application/json

tenants?array<CreateTenantRequest>

Create 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 '{}'
{  "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"      }    }  ],  "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}}
Was this helpful?