---
title: "Add a taxonomy node derived from a document selection"
method: POST
path: "/v1/taxonomies/{taxonomy_identifier}/nodes/from-documents"
tags: ["Taxonomies"]
---

# Add a taxonomy node derived from a document selection

`POST /v1/taxonomies/{taxonomy_identifier}/nodes/from-documents`

## Request

- Base URL: `https://api.mixpeek.com`
- URL: `https://api.mixpeek.com/v1/taxonomies/{taxonomy_identifier}/nodes/from-documents`
- Auth: HTTP bearer and API key in header `X-Namespace`

Add a node to an existing **flat** taxonomy from a document selection.

The node is an ordinary document in the taxonomy's node (source) collection:
its anchor vector is the **centroid of the referenced documents' stored
vectors** and its `label` is `node_label`. Future documents enriched through
this taxonomy are labeled with the nearest node's `label`.

Only stored vectors are read — no re-embedding or GPU work. Documents that
can't contribute (missing, no matching vector) are skipped and reported in
`documents_skipped`; the call fails only when NO document contributes.

Hierarchical taxonomies are not supported here (their nodes are whole
collections) — the error points you to the flat-taxonomy path.

## Path parameters

- `taxonomy_identifier` string, required: Taxonomy ID or name

## Request body

- CreateNodeFromDocumentsRequest: Create a taxonomy node whose classification anchor derives from documents. Mixpeek taxonomy nodes are documents in the taxonomy's source (node) collection: at enrichment time, an incoming document's embedding queries that collection through the taxonomy's retriever and the best-matching node's fields (canonically `label`) are copied onto it. This endpoint computes the CENTROID of the referenced documents' stored vectors and inserts it as a new node document — so future documents whose embeddings land near the referenced selection are classified under `node_label`. No re-embedding or GPU work happens; only stored vectors are read.
  - `node_label` string, required: Label for the new node — the value copied onto documents that classify under it (canonical `label` field).
  - `documents` DocumentRef[], required: Documents whose stored vectors define the node's anchor (centroid). 1-200 refs; for large selections send a sample — the centroid converges quickly.
    - `collection_id` string, required: Collection the document lives in.
    - `document_id` string, required: The document's ID.
  - `node_fields` object, nullable: Optional extra fields stored on the node document (e.g. `description`). Only fields listed in the taxonomy's enrichment_fields are copied during enrichment.
  - `vector_name` string, nullable: Optional explicit vector (index) name for the anchor. If omitted, it is derived from the taxonomy's node collection vector indexes.
  - `provenance` object, nullable: Optional freeform origin context (e.g. cluster_id, run_id, selection type). Stored on the node document under `metadata.promotion` for auditability.

## Response `200`

Successful Response

- TaxonomyNodeFromDocumentsResponse: Result of promoting a document selection to a taxonomy node.
  - `taxonomy_id` string, required
  - `taxonomy_name` string, required
  - `node_document_id` string, required: ID of the created node document (the taxonomy node).
  - `node_collection_id` string, required: The taxonomy's node (source) collection.
  - `node_label` string, required
  - `vector_name` string, required: Vector index name the anchor was stored under.
  - `vector_dimensions` integer, required
  - `documents_used` integer, required: How many referenced documents contributed to the anchor.
  - `documents_skipped` SkippedDocumentRef[]
    - `collection_id` string, nullable
    - `document_id` string, nullable
    - `reason` string, required
  - `taxonomy_created` boolean: True when this call also created the taxonomy (one-gesture mode).
  - `retriever_id` string, nullable: Retriever created for the taxonomy (one-gesture mode only).
  - `enrichment_hint` string, required: Plain-language description of how the new node will be applied to future data.
  - `nodes` PromotedNode[], nullable: Every node created, when the source was a `cluster_run` (one per cluster). `node_document_id` and `node_label` name the first.
    - `node_document_id` string, required
    - `node_label` string, required
    - `cluster_id` string, required
    - `member_count` integer, nullable

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-09** `61a175e8eb9a`: 1 warning, 5 info
  - removed the optional property `detail` from the response with the `422` status
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
  - added the optional property `success` to the response with the `422` status
  - …2 more
- **2026-10-06** `b75474e978ff`: 1 info
  - added the optional property `nodes` to the response with the `200` status
- **2026-10-04** `38e0822db900`: 1 breaking, 1 info
  - removed the success response with the status `201`
  - added the success response with the status `200`
- **2026-08-09** `5d4c905106b4`: 1 info
  - the endpoint scheme security `BearerAuth AND NamespaceHeader` was added to the API

[Operation history](https://skmtc.dev/mixpeek/apis/mixpeek-api/changes/v1/taxonomies/:taxonomy_identifier/nodes/from-documents/post.md)

---

[API](https://skmtc.dev/mixpeek/apis/mixpeek-api.md) - [All operations](https://skmtc.dev/mixpeek/apis/mixpeek-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mixpeek/apis/mixpeek-api/revisions/790bc16455f6?raw)
