Domains
Create Domain
Creates and associates a domain with an organization.
Use one of the following domain types:
- ALLOWED_EMAIL_DOMAIN: Adds a trusted email domain for organization suggestions in the organization switcher during sign-in/sign-up (auth-method agnostic).
- ORGANIZATION_DOMAIN: Enables SSO domain discovery. If a user signs in with a matching email domain, Scalekit redirects them to the organization’s SSO provider and enforces SSO.
The domain must be a valid business domain that you control. Public/disposable domains (e.g., gmail.com) are blocked for security.
post/api/v1/organizations/{organization_id}/domains
Path parameters
organization_idstring required
Scalekit-generated unique identifier for the organization. Use either this or external_id to identify the organization.
Request body
Example request
{
"domain": "customerdomain.com"
}Response
Successfully created the domain.
Example response
{
"domain": {
"create_time": "2025-09-01T12:14:43.100000Z",
"domain": "customerdomain.com",
"domain_type": "ORGANIZATION_DOMAIN",
"environment_id": "env_58345499215790610",
"id": "dom_88351643129225005",
"organization_id": "org_81667076086825451",
"update_time": "2025-09-01T12:14:43.110455Z"
}
}