Skip to main content
PATCH
Update a policy

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Path Parameters

policyId
string<uuid>
required

ID of the policy.

Example:

"a3f1c2d4-5b6e-4f70-8a91-b2c3d4e5f601"

Body

application/json

Send at least one field. Fields you leave out keep their value.

name
string

Rule name (1-255 characters), unique in the project.

Required string length: 1 - 255
appliesIn
enum<string>

EVERY_TURN: applies on every turn of the call. PER_USER_RESPONSE: applies only when what the caller says matches the rule, found by meaning (the name, instructions and matchingExamples are searched), so the exact words don't matter.

Available options:
EVERY_TURN,
PER_USER_RESPONSE
conditionsMatch
enum<string>

ALL: every condition must hold. ANY: at least one must hold. Omitted: keeps the saved value.

Available options:
ALL,
ANY
conditions
object[]

Call variables that must hold for the rule to apply. Empty: applies on every call.

matchingExamples
string | null

What a caller might say, in any language, to help the search find this rule. Only allowed with appliesIn: PER_USER_RESPONSE.

Maximum string length: 5000
instructions
string

The instruction added to the model's instructions while the rule applies (1-100,000 characters).

Required string length: 1 - 100000
notes
string | null

Your own notes. Not used on calls.

Maximum string length: 255
severity
enum<string>

How important the rule is. CRITICAL rules are placed closest to the model's reply and are flagged first in call review. Omitted: keeps the saved value.

Available options:
NORMAL,
HIGH,
CRITICAL

Response

Successful response

success
boolean
Example:

true

message
string
Example:

"success"

data
object

A rule the agent follows: an instruction added to the model while it applies.