---
title: "Override a behavior verdict"
method: PATCH
path: "/api/request-logs/{unique_id}/behaviors/{behavior_key}/"
tags: ["Behaviors"]
---

# Override a behavior verdict

`PATCH /api/request-logs/{unique_id}/behaviors/{behavior_key}/`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/request-logs/{unique_id}/behaviors/{behavior_key}/`
- Auth: HTTP bearer

Records whether a behavior happened on a span, replacing the model's score (Happened / Not happened in the app). The span must already have a verdict for the behavior. Span-level reads use it at once; rollup counts pick it up within 10 minutes for spans from the last 48 hours.

## Path parameters

- `unique_id` string, required
- `behavior_key` string, required

## Request body

- BehaviorOverrideRequest
  - `prob` number, required: The score to record in place of the model's. Send `1` for Happened and `0` for Not happened. The behavior fires when this is 0.65 or higher.

## Response `200`

The span's new verdict.

- BehaviorVerdict
  - `label` 0 | 1, required: `1` when the behavior fired (`prob` is 0.65 or higher), else `0`.
  - `prob` number, required: The score now on the span.
  - `source` string, required: `human` after an override.
  - `state` 'detected' | 'uncertain' | 'not_detected', required: `detected` at 0.65 or higher, `uncertain` from 0.35 up to 0.65, else `not_detected`.
  - `polarity` 'negative' | 'positive' | 'neutral', required: Whether the behavior firing is good or bad: `negative` (an Issue), `positive` (a Win) or `neutral` (Info). Display metadata only; it does not change how spans are scored.

## Other responses

- `400`: `prob` is missing, not a number, or outside 0 to 1.
- `403`: Forbidden: the API key is missing, invalid or expired; the key doesn't grant `logs:update` (Write access does); behaviors are turned off for the organization.
- `404`: The span has no verdict for this behavior: it doesn't exist, hasn't been scored yet, or the behavior is turned off.
- `409`: Another override of the same verdict is in progress. Retry.
- `429`: Rate limited. This endpoint allows 30 requests per minute per organization.

## Changes

- **2026-10-21** `c30bcb383ee8`: 4 breaking, 2 warning, 8 info
  - request body became required
  - the response property `polarity` became nullable for the status `200`
  - the `label` response's property type changed from `string` to `integer` for status `200`
  - the `prob` response's property format changed from `double` to no format for status `200`
  - …10 more
- **2026-10-02** `b830b79cfd52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/respan/apis/respan-api/changes/api/request-logs/:unique_id/behaviors/:behavior_key/patch.md)

---

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