---
title: "create_domain"
method: POST
path: "/v1/domains"
tags: ["domains"]
---

# create_domain

`POST /v1/domains`

## Request

- Base URL: `https://ndi-api.nace.ai`
- URL: `https://ndi-api.nace.ai/v1/domains`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/nace/apis/ndi-platform-api/docs/v1/domains/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a tenant-owned draft. Cost class: fast.

The draft is editable and **unusable** until published. Validation runs on
every write and is returned every time, so a caller never has to guess
whether a publish will succeed.

## Request body

- CreateDomainRequest: Creates a taxonomy ``draft`` at version 1 in the caller's tenant.
  - `display_name` string, required
  - `slug` string, required
  - `taxonomy` NdiServiceAppPlatformApiDomainsSchemasTaxonomy, required: The classification vocabulary.
    - `allow_other` true: Cannot be disabled: a document that fits nothing is labelled 'other', never force-fitted.
    - `classes` TaxonomyClass[]
      - `aliases` string[]: Renames land here so old folder paths stay resolvable.
      - `description` string, required: Written for the classifier — it IS the prompt.
      - `group` string, required
      - `subgroup` string, required

## Response `201`

Successful Response

- DomainResponse
  - `domain` Domain, required: A domain with its effective taxonomy already resolved. A caller reading a domain wants the taxonomy that will actually be applied, not a delta they have to merge themselves.
    - `class_count` integer, required
    - `display_name` string, required
    - `domain_id` string, uuid, required
    - `owner` 'platform' | 'tenant', required
    - `parent_slug` string, nullable: Inheritance lineage for platform domains that extend a base vocabulary.
    - `published_at` string, date-time, nullable
    - `selectable` boolean, required: True once published; a workspace may only pin a published version.
    - `slug` string, required
    - `status` 'draft' | 'published', required
    - `taxonomy` TaxonomyOutput, required: The classification vocabulary.
      - `allow_other` true: Cannot be disabled: a document that fits nothing is labelled 'other', never force-fitted.
      - `classes` TaxonomyClass[]
        - `aliases` string[]: Renames land here so old folder paths stay resolvable.
        - `description` string, required: Written for the classifier — it IS the prompt.
        - `group` string, required
        - `subgroup` string, required
    - `version` integer, required
  - `validation` DomainValidation, required: Returned on every domain write, so a caller never has to guess whether a publish will succeed.
    - `effective_class_count` integer, required
    - `errors` DomainValidationError[]
      - `code` string, required
      - `message` string, required
      - `path` string, required
    - `valid` boolean, required

## Other responses

- `504`: Gateway Timeout
- `default`: Typed error envelope used by every 4xx and 5xx. ``error.code`` distinguishes the failure; HTTP status is a consequence of the code.

---

[API](https://skmtc.dev/nace/apis/ndi-platform-api.md) - [All operations](https://skmtc.dev/nace/apis/ndi-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nace/apis/ndi-platform-api/revisions/d002a3589a67?raw)
