メインコンテンツへスキップ

provision-partner-tenant

dci provision-partner-tenant

Provisions a new tenant (child customer) under the calling partner organization. Returns the new tenant and customer IDs along with admin invite status. Idempotent: if a tenant with the same tenantName already exists under the calling org, the endpoint returns 409 Conflict with the existing IDs.

Request

Content-Type: application/json

Schema

{
"type": "object",
"required": [
"tenantName",
"adminEmail",
"adminFirstName",
"adminLastName"
],
"properties": {
"tenantName": {
"type": "string",
"description": "Display name of the new tenant. Required. Max 200 characters.",
"example": "Acme Corp"
},
"parentTenantId": {
"type": "string",
"description": "DoiT customer ID of the parent tenant. Optional. If omitted, the parent parameter defaults to the organization ID extracted from the caller's JSON Web Token (JWT).",
"example": "abc123"
},
"primaryDomain": {
"type": "string",
"description": "Primary domain for the tenant (optional). Omit or leave empty for none.",
"example": "acme.com"
},
"tenantType": {
"type": "string",
"enum": [
"end_customer",
"reseller"
],
"description": "Optional. The type of child tenant to create under the parent: a reseller or an end customer. If omitted, the platform uses its default child type for that parent."
},
"adminEmail": {
"type": "string",
"format": "email",
"description": "Required Email address for the tenant admin user. Echoed in the 201 response.",
"example": "[email protected]"
},
"adminFirstName": {
"type": "string",
"description": "First name of the tenant admin. Max 200 characters.",
"example": "Jane"
},
"adminLastName": {
"type": "string",
"description": "Last name of the tenant admin. Max 200 characters.",
"example": "Doe"
},
"adminJobFunction": {
"type": "string",
"description": "Job function label for the admin (optional). It must match an allowed label exactly or the call fails validation.",
"example": "FinOps Practitioner"
}
}
}

Responses

201 (application/json)

Created - Tenant provisioned successfully.

{
"type": "object",
"required": [
"tenantId",
"customerId",
"message",
"adminEmail",
"adminInviteStatus"
],
"properties": {
"tenantId": {
"type": "string",
"description": "The new tenant's DoiT tenant ID."
},
"customerId": {
"type": "string",
"description": "The new tenant's DoiT customer ID."
},
"message": {
"type": "string",
"example": "Tenant provisioned successfully"
},
"adminEmail": {
"type": "string",
"format": "email",
"description": "Canonical admin email used for the invite."
},
"adminInviteStatus": {
"type": "string",
"enum": [
"sent",
"skipped",
"failed"
],
"description": "Result of the admin invite after the tenant is created. The tenant can still be created when the invite is skipped or fails.",
"x-enumDescriptions": {
"sent": "Invite email was created; `adminInviteId` is set.",
"skipped": "Invite was not sent; see `adminInviteSkipReason`.",
"failed": "Invite attempt failed; the tenant was still created."
}
},
"adminInviteId": {
"type": "string",
"description": "Invite ID when adminInviteStatus is `sent`."
},
"adminInviteSkipReason": {
"type": "string",
"description": "Reason the invite was skipped when adminInviteStatus is `skipped`."
}
}
}

400 (application/json)

Bad Request - The server cannot process the request, often due to a malformed request.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

401 (application/json)

Unauthorized - Invalid API key.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

403 (application/json)

Forbidden - The client is not authorized to perform the request.

{
"type": "object",
"description": "Standard error response structure.",
"properties": {
"error": {
"type": "string",
"description": "Detailed error message."
}
}
}

409 (application/json)

Conflict - A tenant with the same name already exists under the calling org.

{
"type": "object",
"required": [
"error",
"conflictReason",
"message"
],
"properties": {
"error": {
"type": "string"
},
"conflictReason": {
"type": "string"
},
"message": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"customerId": {
"type": "string"
}
}
}

Aliases: provision-partner-tenant, provisionpartnertenant