---
title: "Update Deal Criteria"
method: POST
path: "/api/pipeline/deals/{deal_id}/criteria"
tags: ["pipeline"]
---

# Update Deal Criteria

`POST /api/pipeline/deals/{deal_id}/criteria`

Update a deal's per-stage success-criteria overrides and trigger a
criteria_changed replan.

Mirrors `/goal`: normalizes the sparse override patch, stamps it on the deal
(NULL when empty) while rotating `pipeline_run_token`, enqueues exactly ONE
`pipeline_deal_replan`, and fires a best-effort `criteria_changed` timeline
event. The replan resolves the deal's current stage via the join (no
`new_stage_name`).

## Query parameters

- `user_id` string, nullable
- `org_id` string, nullable

## Request body

- UpdateDealCriteriaRequest — Body for /deals/{deal_id}/criteria. Per-deal success-criteria overrides. REPLACE semantics: the caller sends the full desired override set (sparse per-stage delta keyed by lead/opportunity/won/lost); blank/absent fields drop, an empty map clears all overrides (stored NULL). Normalization caps criteria length.
  - `stage_criteria_overrides` object

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

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