Create Policy

POST /v2/policies

Required Permissions

NameConditions

Policies:Create

Always Required

Body

PropertyType / OptionalDescription

name*

String

A name for the Policy.

activityKind*

String

The kind of activity that the policy will be evaluating and guarding. See Activities for all supported values.

rule*

Object

See Policy Rules for all supported rules.

action*

Object

The action that will be taken if a policy is triggered. See Policy Actions for supported actions

filters

Object

Reduces the scope on which the policy applies. See Policy Filters for supported filters

Example

{
  "name": "Transfer Limit",
  "activityKind": "Wallets:Sign",
  "rule": {
    "kind": "TransactionAmountLimit",
    "configuration": {
      "currency": "USD",
      "limit": "1000"
    }
  },
  "action": {
    "kind": "RequestApproval",
    "autoRejectTimeout": 60
    "approvalGroups": [
      {
        "name": "Admins",
        "quorum": 2,
        "approvers": {
          "userId": {
            "in": ["us-...1", "us-...2", "us-...3"]
          }
        }
      }
    ],
  },
  "filters": {
    "walletId": {
      "in": ["wa-...1", "wa-...2"]
    }
  }
}

Response

Response example

{
  "id": "plc-...",
  "name": "Transfer Limit",
  "status": "Active",
  "activityKind": "Wallets:Sign",
  "rule": {
    "kind": "TransactionAmountLimit",
    "configuration": {
      "currency": "USD",
      "limit": "1000"
    }
  },
  "action": {
    "kind": "RequestApproval",
    "autoRejectTimeout": 60,
    "approvalGroups": [
      {
        "name": "Admins",
        "quorum": 2,
        "approvers": {
          "userId": {
            "in": ["us-...1", "us-...2", "us-...3"]
          }
        }
      }
    ],
  },
  "filters": {
    "walletId": {
      "in": ["wa-...1", "wa-...2"]
    }
  },
}

Last updated