Create a new policy
Create a new policy to automatically control transaction behavior. Policies define rules that allow, block, or require approval for transactions based on conditions like amount, recipient, or asset type.
Request Body
| Field | Type | Required | Description |
|---|
name | string | Yes | Human-readable policy name (max 255 chars, unique in org) |
description | string | Yes | Description of policy purpose and behavior |
type | string | No | Action type (TRANSFER, CONTRACT_WRITE, CONTRACT_READ, CONTRACT_DEPLOY, MINT, BURN, RAW_SIGNING, TYPED_MESSAGE) |
status | string | No | Initial status (default: DRAFT) |
enforcementMode | string | No | STRICT (default) or AUDIT_ONLY |
conditionLogic | string | No | ALL (default, AND logic) or ANY (OR logic) |
policyGroupId | string | No | Optional policy group UUID (nullable) |
conditions | array | Yes | Array of condition objects (at least one required) |
actions | array | Yes | Array of action objects |
Condition Object
| Field | Type | Description |
|---|
field | string | Field to evaluate (e.g., transaction.amount, transaction.recipient) |
operator | string | Comparison operator (e.g., GREATER_THAN, EQUALS, IN_LIST) |
value | any | Value to compare against |
unit | string | Optional unit (e.g., USD for amounts) |
description | string | Optional description of the condition |
Action Object
| Field | Type | Description |
|---|
type | string | ALLOW, BLOCK, REQUIRE_APPROVAL, or NOTIFY |
requiredApprovers | number | Optional for REQUIRE_APPROVAL (minimum 1) |
approverListId | string | Optional named list ID for approvers |
notificationTarget | string | Required for NOTIFY action |
metadata | object | Optional arbitrary metadata object (nullable) |
Required Permission
policies:create