---
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 entitlement check fetches the user profile lazily — only a retarget
onto a toggle-gated 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
    - `budgetAuthority` 'credits' | 'paid_balance' — Which budget a metered run draws down. Two members, because there are two budgets. Free usage and paid usage are the same balance on the same account, spent at the same prices and refused by the same check; what a workspace paid for that balance decides what its refusal offers next, not how the run is admitted. A third member for the free tier is what let the two drift — different prices, different exemptions, different per-run sizing — while both claimed to meter usage.
    - `creditCost` integer, nullable, required
    - `admittedCount` integer, nullable
    - `admittedSelectionFingerprint` string, nullable
    - `remainderCount` integer
    - `remainderSelectionFingerprint` string, nullable
    - `allowanceCode` string, nullable
  - `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

## Changes

- **2026-09-12** `604ea84d0ff7` — 1 breaking, 6 warning, 8 info
  - removed the enum value `discovery_allowance` of the request property `confirmation/anyOf[subschema #1: EnrichmentUpdatePreview]/budgetAuthority`
  - added the new `budget_exhausted` enum value to the `anyOf[subschema #1: DiscoveryAllowanceAdmissionErrorResponse]/detail/code` response property for the response status `409`
  - added the new `budget_unavailable` enum value to the `anyOf[subschema #1: DiscoveryAllowanceAdmissionErrorResponse]/detail/code` response property for the response status `409`
  - added the new `confirmation_required` enum value to the `anyOf[subschema #1: DiscoveryAllowanceAdmissionErrorResponse]/detail/code` response property for the response status `409`
  - …11 more
- **2026-08-27** `e17aaa23de12` — 1 warning
  - added the new `discovery_allowance_run_unaffordable` enum value to the `anyOf[subschema #1: DiscoveryAllowanceAdmissionErrorResponse]/detail/code` response property for the response status `409`
- …earlier changes not shown

[Full history](https://skmtc.dev/maia-analytics/apis/maia-api/changes/api/v1/enrichment/:enrichment_id/put.md)

---

[API](https://skmtc.dev/maia-analytics/apis/maia-api.md) · [All operations](https://skmtc.dev/maia-analytics/apis/maia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/maia-analytics/apis/maia-api/revisions/bb508e935174?raw)
