---
title: "Create Tenant"
method: POST
path: "/tenants"
tags: ["Identity"]
---

# Create Tenant

`POST /tenants`

Creates a new tenant under a CoreStack account. There can be multiple tenants within a CoreStack account.

## Request body

- CreateTenantRequest
  - `name` string, required — Name of the new tenant to be created. Tenant Name must be globally unique within CoreStack. If the same tenant name is used in another account, creation wil fail. Tenant Name must start with alphabet and can contain 2-50 characters. Special characters ' " # ? / \ are not allowed.
  - `description` string — Description of the new tenant to be created.
  - `metadata` object — metadata is a freeform JSON. It allows to store custom keys and values. It will be useful for storing information about an external applications that will refer to CoreStack tenant.
  - `account_id` string, required — Id of the CoreStack account under which the new tenant to be created.

## Response `201`

Created

- TenantCreateResponse
  - `tenant_id` string, required — Id of the newly created tenant. This will be used for performing tenant level operations such as createPolicy, createScript, onboardCloudAccount and so on.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `500` — Internal Server Error

---

[API](https://skmtc.dev/corestack/apis/corestack-external-api.md) · [All operations](https://skmtc.dev/corestack/apis/corestack-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/corestack/corestack-external-api/revisions/bf2cdf20826d/schema)
