---
title: "Cancel Enrichment Workflow"
method: POST
path: "/api/v1/enrichment/cancel/{workflow_id}"
tags: ["enrichment"]
---

# Cancel Enrichment Workflow

`POST /api/v1/enrichment/cancel/{workflow_id}`

Cancel an in-flight DBOS enrichment workflow + refund any unsettled credits [MAIA-1468].

Returns 204 on success (idempotent on terminal states). 404 if the
workflow has no reservation row (Celery-routed enrichment or unknown ID)
or if the user doesn't own the workspace it belongs to. Cross-workspace
access is 404 not 403 to avoid leaking workflow existence.

The ``_current_user`` Depends enforces authn; workspace authz is resolved
inside the service via the request-scoped ``UserService`` (already bound
to the current user via DI).

## Path parameters

- `workflow_id` string, required

## Response `204`

Successful Response

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