# Create sub-account (tenant)

Assign an existing account (tenant) to the hierarchy as a sub-account of a given parent account. A vendor token is required for this route, it can be obtained from the vendor authentication route.

Endpoint: POST /resources/hierarchy/v1
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `parentTenantId` (string)

  - `childTenantId` (string)

## Response 400:

  - `400` (unknown)
    When:a) given parameters do not pass validationb) or parent and child account (tenant) are equal:c) or child account (tenant) is already a sub-account in other organization's hierarchy

