---
title: "Create Domain"
method: POST
path: "/api/v1/organizations/{organization_id}/domains"
tags: ["Domains"]
---

# Create Domain

`POST /api/v1/organizations/{organization_id}/domains`

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.

## Path parameters

- `organization_id` string, required

## Request body

- V1domainsCreateDomain
  - `domain` string — The domain name to be configured. Must be a valid business domain you control. Public and disposable domains (gmail.com, outlook.com, etc.) are automatically blocked for security.
  - `domain_type` 'ALLOWED_EMAIL_DOMAIN' | 'ORGANIZATION_DOMAIN'

## Response `200`

Successfully created the domain.

- DomainsCreateDomainResponse
  - `domain` DomainsDomain
    - `create_time` string, date-time — Timestamp when the domain was first created.
    - `domain` string — The business domain name that was configured for allowed email domain functionality (e.g., company.com, subdomain.company.com).
    - `domain_type` string
    - `environment_id` string — The environment ID where this domain is configured.
    - `id` string — Scalekit-generated unique identifier for this domain record.
    - `organization_id` string — The organization to which the domain belongs.
    - `update_time` string, date-time — Timestamp when the domain was last updated.
    - `verification_method` 'ADMIN' | 'DNS' | 'NOT_APPLICABLE'
    - `verification_status` 'PENDING' | 'VERIFIED' | 'FAILED' | 'AUTO_VERIFIED'

## Other responses

- `400` — Invalid request — common causes invalid domain format, public or disposable domain, or domain already exists.

---

[API](https://skmtc.dev/scalekit/apis/scalekit-api-reference.md) · [All operations](https://skmtc.dev/scalekit/apis/scalekit-api-reference/llms.txt) · [OpenAPI document](https://skmtc.dev/scalekit/apis/scalekit-api-reference/revisions/572b4547425e?raw)
