---
title: "Create sub-tenant"
method: POST
path: "/resources/sub-tenants/v1"
tags: ["Sub-Accounts"]
---

# Create sub-tenant

`POST /resources/sub-tenants/v1`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/sub-tenants/v1`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/sub-tenants/v1/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new sub tenant. If tenant with given ID had existed before and was removed, then this action will reactivate that tenant. A user or vendor token is required for this route. A user token can be obtained after user authentication.

## Request body

- CreateSubTenantRequest
  - `tenantId` string, required
  - `name` string, required
  - `parentTenantId` string, required
  - `status` string: This field can be used for custom logic, it is not enforced in Frontegg flows
  - `logo` string: Base64-encoded image to use as logo.
  - `logoUrl` string
  - `creatorName` string
  - `creatorEmail` string
  - `isReseller` boolean

## Other responses

- `400`: When tenant ID does not pass validation.

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
