---
title: "publish_domain"
method: POST
path: "/v1/domains/{domain_id}/publish"
tags: ["domains"]
---

# publish_domain

`POST /v1/domains/{domain_id}/publish`

## Request

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

Freeze a draft version and make it selectable by workspaces. Cost class: fast.

The gate rejects empty or oversized taxonomies, duplicate
``group/subgroup`` paths, and attempts to redefine ``other``.

There is no delete route — a workspace whose domain vanished could not
explain its own categories. Move workspaces to a newer version instead.

## Path parameters

- `domain_id` string, uuid, required: Domain version identifier.

## Response `200`

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/54dad7e0ff00?raw)
