Frontegg is built with multi-tenancy in mind, allowing the creation and management of multiple accounts (tenants) within an environment. This section provides an overview of relevant API endpoints, organized into Management and Self-Service categories, supporting the creation of accounts, hierarchies, and sub-accounts.
Management Endpoints: Require environment-level authorization and offer full control over resources, including SSO (SAML and OIDC) configurations, account hierarchies, and sub-accounts.
Self-Service Endpoints: Accessible with a user token (JWT), enabling users with the appropriate permissions to create, update, and delete sub-accounts from ah hierarchy.
https://api.frontegg.com/tenants/
https://api.us.frontegg.com/tenants/
https://api.ca.frontegg.com/tenants/
https://api.au.frontegg.com/tenants/
https://{domain}.frontegg.com/tenants/
Add metadata to an account (tenant).
If a metadata key already exists, its value is overwritten.
Provide the account (tenant) ID as a path parameter and the metadata object in the request body.
An environment token is required for this route and can be obtained from the environment authentication route.
https://api.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata
https://api.us.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata
https://api.ca.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata
https://api.au.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata
https://app-xxx.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata
curl -i -X POST \
'https://api.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"metadata": {
"maximumUsers": 50
}
}'
https://api.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata/{key}
https://api.us.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata/{key}
https://api.ca.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata/{key}
https://api.au.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata/{key}
https://app-xxx.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata/{key}
curl -i -X DELETE \
'https://api.frontegg.com/tenants/resources/tenants/v1/{tenantId}/metadata/{key}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'
Retrieve all accounts (tenants) for an environment.
Supports filtering, sorting, and pagination. You can filter by account name or account (tenant) ID, sort by createdAt
, name
, or tenantId
, and specify the order (ASC
or DESC
).
You can also provide specific account (tenant) IDs to retrieve only those accounts (tenants). The default limit is 50 accounts (tenants) per request; the maximum is 200.
https://api.frontegg.com/tenants/resources/tenants/v2
https://api.us.frontegg.com/tenants/resources/tenants/v2
https://api.ca.frontegg.com/tenants/resources/tenants/v2
https://api.au.frontegg.com/tenants/resources/tenants/v2
https://app-xxx.frontegg.com/tenants/resources/tenants/v2
curl -i -X GET \
https://api.frontegg.com/tenants/resources/tenants/v2 \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'