Skip to main content
POST
Add rule to draft policy

Authorizations

X-API-Key
string
header
required

Headers

API-Version
enum<string>
default:v1

API version (defaults to the latest supported version if omitted).

Available options:
v1
Idempotency-Key
string
required

Unique key (1-255 printable ASCII chars) used to safely retry write operations. Same key + body returns the cached response; same key + different body returns 409.

Required string length: 1 - 255

Path Parameters

id
string<uuid>
required

Policy ID

Body

application/json
action_type
enum<string>
required

Action taken when the rule matches: allow, block, require_approval, alert, or delay.

Available options:
allow,
block,
require_approval,
alert,
delay
Example:

"require_approval"

name
string
required

Human-readable name of the rule (2–255 characters).

Required string length: 2 - 255
Example:

"Block large transfers"

action_config
string[]

Type-specific configuration for the action; shape depends on action_type.

conditions
object[]

Conditions that must all match for the rule to apply; optional on a draft, required when activating.

description
string

Optional free-text summary of the rule's intent.

Maximum string length: 1000
order
integer

Position of the rule in the policy's first-match-wins evaluation order; appended in creation order when omitted.

Response

Created

action_config
any

Type-specific configuration for the action; shape depends on action_type.

action_type
string

Action taken when the rule matches: allow, block, require_approval, alert, or delay.

Example:

"require_approval"

conditions
object[]

Conditions that must all match for the rule to apply.

created_at
string<date-time>

Timestamp when the rule was created.

Example:

"2026-05-16T10:30:00Z"

description
string

Optional free-text summary of the rule's intent.

id
string

Unique identifier of the rule.

Example:

"7c9e6679-7425-40de-944b-e07fc1f90ae7"

name
string

Human-readable name of the rule.

Example:

"Block large transfers"

object
string

Object type discriminator; always "rule".

Example:

"rule"

order
integer

Position of the rule in the policy's first-match-wins evaluation order.

Example:

1

priority
integer

Evaluation priority of the rule.

Example:

50

updated_at
string<date-time>

Timestamp when the rule was last updated.

Example:

"2026-05-16T10:30:00Z"