---
title: "Update Enrichment"
method: PUT
path: "/api/v1/enrichment/{enrichment_id}"
tags: ["enrichment"]
---

# Update Enrichment

`PUT /api/v1/enrichment/{enrichment_id}`

Update an enrichment. Requires ownership of the project containing the enrichment.

The mortgage entitlement check fetches the user profile lazily — only a
retarget onto the mortgage tool pays the profile DB round-trip.

Args:
    enrichment_id: The ID of the enrichment to update (pre-validated)
    request: The request object containing updated fields
    enrichment_service: Service for handling enrichment operations

Returns:
    Dictionary containing enrichment data

## Request body

- UpdateEnrichmentRequest — Request schema for updating an enrichment. Attributes: updates: Structured updates for the enrichment
  - `updates` EnrichmentUpdates, required — Schema for enrichment update fields. This provides a structured representation of fields that can be updated. Add specific fields here instead of using a generic Dict[str, Any].
    - `name` string, nullable
    - `description` string, nullable
    - `tool` string, nullable
    - `params` object, nullable
    - `dtype` union
      - 'string' | 'float' | 'boolean' | 'list[str]' | 'jsonb' | 'int' | 'url'
      - 'categorical'
      - 'ContactModel' | 'TenantLeaseConcise' | 'OwnerResidentialMailingAddress' | 'MortgageProfile'
    - `updated_at` string, date-time, nullable
  - `confirmation` EnrichmentUpdatePreview — Stable approval contract for an update that must re-run stored results.
    - `enrichmentId` string, uuid, required
    - `enrichmentName` string, required
    - `oldConfigFingerprint` string, required
    - `targetConfigFingerprint` string, required
    - `selectionFingerprint` string, required
    - `affectedCount` integer, required
    - `protectedCount` integer
    - `oldDtype` string, required
    - `targetDtype` string, required
    - `creditCost` integer, required
  - `stable_run_key` string, nullable

## 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

- `409` — The update needs approval before stored rows are re-enriched.
- `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/fff2cd2dfbac/schema)
