Create Policy Rule
POST /policies/policy-rules
Policy Rules determine when Policy Executions are created. The type of policy rule applied is determined by the kind
field in the nested configuration
object. These are the supported kinds:
AlwaysActivated
: Always trigger the policy.TransferAmountLimit
: Trigger the policy if the transfer is over a given limit. (Wallets only.)PaymentAmountLimit
: Trigger the policy if the payment is over a given limit. (Asset accounts only. Deprecated)
User action signature required. See User Action Signing for more information.
Request headers required. See Request Headers for more information.
Authentication required. See Authentication Headers for more information.
Required Permissions
Name | Conditions |
---|---|
| Always Required |
Request body
The following fields are common to all kinds of Policy Rules:
Request body fields | Required/Optional | Description | Type |
---|---|---|---|
| Required | A name for the rule | String |
| Required | A description for the rule | String |
| Required | A nested object specifying details of the Policy Rule | Object |
Amount Limit Rule
Use the following fields in the nested configuration
object to create a Policy Rule which triggers a Policy Execution if the Transfer amount is over the specified amount:
Request body fields | Required/Optional | Description | Type |
---|---|---|---|
| Required | Specify: "TransferAmountLimit" | Enumerated Type |
| Required | The amount over which the policy should trigger - specified as a string | String |
| Required | The currency used to denominate the limit field - one of "USD", "EUR" | String |
Example Body:
Always Activated Rule
Use the following fields in the nested configuration
object to create a Policy Rule which always triggers:
Request body fields | Required/Optional | Description | Type |
---|---|---|---|
| Required | Specify: "AlwaysActivated" | Enumerated Type |
Example Body:
Response
Response example
If successful, the response contains, among other things, a status indicating whether the rule has been enabled:
Last updated