---
title: "Update a custom behavior"
method: PATCH
path: "/api/pulses/behaviors/custom/{id}/"
tags: ["Behaviors"]
---

# Update a custom behavior

`PATCH /api/pulses/behaviors/custom/{id}/`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/pulses/behaviors/custom/{id}/`
- Auth: HTTP bearer

Changes a custom behavior's name, definition or polarity. A new definition reaches new spans within about a minute; past spans are not rescored.

## Path parameters

- `id` string, required

## Request body

- CustomBehaviorUpdateRequest: Send only the fields to change.
  - `description` string: New definition. New spans are scored against it within about a minute. Past spans are not rescored.
  - `name` string, nullable: New display name. Blank or `null` clears it.
  - `polarity` 'negative' | 'positive' | 'neutral': 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.

## Response `200`

The updated behavior, without tags.

- CustomBehavior
  - `id` string, required: Custom behavior ID. It is also the behavior's key in analytics, filters and span verdicts.
  - `name` string, nullable, required: Display name. Optional and not unique; behaviors are identified by `id`.
  - `description` string, required: The plain-language definition span-01 scores each span against. Say what counts and what doesn't. At least 3 characters after trimming.
  - `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.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Validation failed. The body maps each invalid field to its errors.
- `403`: Forbidden: the API key is missing, invalid or expired; the key doesn't grant `custom_behaviors:update` (Write access does); behaviors are turned off for the organization.
- `404`: No custom behavior with this ID in your organization.
- `429`: Rate limited. This endpoint allows 30 requests per minute per organization.

## Changes

- **2026-10-21** `c30bcb383ee8`: 7 breaking, 4 info
  - request body became required
  - added `#/components/schemas/BehaviorPolarity` to the `polarity` request property `allOf` list
  - removed the enum value `negative` of the request property `polarity`
  - removed the enum value `neutral` of the request property `polarity`
  - …7 more
- **2026-10-02** `b830b79cfd52`: 1 info
  - endpoint added
- **2026-08-13** `4e064cf81dae`: 1 breaking
  - api path removed without deprecation
- **2026-07-31** `c26d550029f8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/keywordsai/apis/respan-api/changes/api/pulses/behaviors/custom/:id/patch.md)

---

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