---
title: "Add enrichment to table"
method: POST
path: "/external/v1/table/{table_uuid}/add-enrichment"
tags: ["Table"]
---

# Add enrichment to table

`POST /external/v1/table/{table_uuid}/add-enrichment`

## Request

- Base URL: `https://api.databar.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.databar.ai/external/v1/table/{table_uuid}/add-enrichment`
- Auth: API key in header `x-apikey`

Attach an enrichment to a table and map its parameters to columns.

``mapping`` maps each enrichment parameter name to a value source:

* ``{"type": "mapping", "value": "<column_name>"}`` — read the value from a
  table column, per row. ``value`` is the column name, its
  ``additional_intenal_name`` or its UUID.
* ``{"type": "simple", "value": "<constant>"}`` — a static value for every
  row. ``value`` may embed ``{column_name}`` placeholders (replaced with the
  column value per row) and ``{?column_name}`` for optional references.

Example body::

    {"enrichment": 7, "mapping": {"id": {"type": "mapping", "value": "hn_id"}}}

## Path parameters

- `table_uuid` string, uuid, required

## Request body

- AddEnrichmentIn
  - `enrichment` integer, required: The enrichment ID to add.
  - `mapping` object, required: Maps each enrichment parameter name to a value source. Each value is {"type": "mapping"|"simple", "value": ...}. Use type="mapping" to pull from a table column per row (value = column name), or type="simple" for a static value (value may contain {column} placeholders). See GET /{table_uuid}/columns for valid column names.
  - `launch_strategy` 'run_on_click' | 'run_on_update'

## Response `200`

OK

- AddEnrichmentOut
  - `id` integer, required
  - `enrichment_name` string, required

---

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