Skip to navigation

Update a custom behavior

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

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

Path parameters

idstringRequired
Custom behavior ID.

Request

This endpoint expects an object.
descriptionstringOptional>=3 characters
New definition. New spans are scored against it within about a minute. Past spans are not rescored.
namestring or nullOptional<=128 characters

New display name. Blank or null clears it.

polarityenumOptional

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.

Allowed values:

Response

The updated behavior, without tags.
idstring
Custom behavior ID. It is also the behavior's key in analytics, filters and span verdicts.
namestring or null<=128 characters

Display name. Optional and not unique; behaviors are identified by id.

descriptionstring

The plain-language definition span-01 scores each span against. Say what counts and what doesn't. At least 3 characters after trimming.

polarityenum

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.

Allowed values:
created_atdatetime
updated_atdatetime

Errors

400
Bad Request Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error