Skip to main content
POST

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 '

Body

application/json
name
string
required

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

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

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
instructions
string
required

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

Required string length: 1 - 100000
conditionsMatch
enum<string>
default:ALL

ALL: every condition must hold. ANY: at least one must hold.

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
notes
string | null

Your own notes. Not used on calls.

Maximum string length: 255
severity
enum<string>
default:NORMAL

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

Available options:
NORMAL,
HIGH,
CRITICAL

Response

Created

success
boolean
Example:

true

message
string
Example:

"success"

data
object

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