---
title: "Create Enrichment"
method: POST
path: "/api/v1/enrichment/create"
tags: ["enrichment"]
---

# Create Enrichment

`POST /api/v1/enrichment/create`

Create a new enrichment with default values. Requires layer ownership.

Args:
    request: The request object containing layer_id (pre-validated)
    enrichment_service: Service for handling enrichment operations

Returns:
    Dictionary containing enrichment data

## Request body

- CreateEnrichmentRequest — Request schema for creating an enrichment. Attributes: project_id: Unique identifier for the project
  - `project_id` string, uuid, required
  - `layer_id` string, uuid, required

## Response `200`

Successful Response

- EnrichmentResponse — Base response schema for enrichment operations. Attributes: enrichment: EnrichmentModel containing enrichment data
  - `enrichment` EnrichmentModel, required — Enrichment model that combines both properties and chat history. This unified model simplifies the domain representation and aligns more closely with how data is stored in the database, reducing unnecessary abstractions.
    - `id` string, uuid
    - `layer_id` string, uuid, nullable
    - `name` string
    - `description` string, nullable
    - `tool` string
    - `params` object
    - `dtype` string — Must be one of string, boolean, list[str], jsonb, int, float, categorical, url
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `credits_per_row` integer, required — Return the number of credits per row for this tool.
    - `is_configured` boolean, required — Check if the enrichment is configured with a valid tool. Returns: bool: True if tool is configured, False otherwise
    - `is_configuration_failed` boolean, required — Check if the enrichment's configuration failed. Returns: bool: True if configuration was attempted but failed
    - `is_data_source` boolean, required — Check if the enrichment is a data source. Returns: bool: True if the enrichment is a data source, False otherwise

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/maia-analytics/apis/maia-api.md) · [All operations](https://skmtc.net/maia-analytics/apis/maia-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maia-analytics/maia-api/revisions/ba2b8d962161/schema)
