# Sub-accounts ## Create sub-account - [POST /resources/sub-tenants/v1](https://developers.frontegg.com/ciam/api/tenants/sub-accounts/subtenantcontrollerv1_createsubtenant.md): Create a new sub-account (tenant). If an account with given ID had existed before and was removed, then this action will reactivate that account. A user or vendor token is required for this route. A user token can be obtained after user authentication. ## Update sub-account (tenant) management - [PUT /resources/sub-tenants/v1/{tenantId}/management](https://developers.frontegg.com/ciam/api/tenants/sub-accounts/subtenantcontrollerv1_updatesubtenantmanagement.md): Enable sub-account to give child accounts multi-seller management capabilities. Send isReseller: true to update sub-accounts with this capability ## Update sub-account hierarchy settings - [PUT /resources/sub-tenants/v1/{tenantId}/hierarchy-settings](https://developers.frontegg.com/ciam/api/tenants/sub-accounts/subtenantcontrollerv1_updatesubtenanthierarchysettings.md): Set the default behavior of sub-account access in an account (tenant). Set subAccountAccessType to defaultOff or defaultOn to allow sub-account access to be changed, or alwaysOn to force sub-account access on all users. ## Delete a sub-account by ID - [DELETE /resources/sub-tenants/v1/{tenantId}](https://developers.frontegg.com/ciam/api/tenants/sub-accounts/subtenantcontrollerv1_deletesubtenant.md): Delete a sub-account. A user or vendor token is required for this route. A user token can be obtained after user authentication. ## Get sub-accounts (tenants) - [GET /resources/hierarchy/v1](https://developers.frontegg.com/ciam/api/tenants/sub-accounts/tenanthierarchycontrollerv1_getsubtenants.md): Get all sub-accounts from the hierarchy. A user token or vendor token are required for this route. A user token can be obtained after user authentication. A vendor token is required for this route, it can be obtained from the vendor authentication route. ## Get parent accounts (tenants) - [GET /resources/hierarchy/v1/parents](https://developers.frontegg.com/ciam/api/tenants/sub-accounts/tenanthierarchycontrollerv1_getparenttenants.md): Get all parent accounts from the hierarchy. A user token or vendor token are required for this route. A user token can be obtained after user authentication. A vendor token can be obtained from the vendor authentication route. ## Get sub-accounts (tenanants) hierarchy tree - [GET /resources/hierarchy/v1/tree](https://developers.frontegg.com/ciam/api/tenants/sub-accounts/tenanthierarchycontrollerv1_getsubtenantstree.md): Get all sub-accounts hierarchy as a tree structure. A user token or vendor token are required for this route. A user token can be obtained after user authentication. A vendor token is required for this route, it can be obtained from the vendor authentication route.