Create Policy
POST /policies
Policies join Policy Rules and Policy Controls with an activityKind
that determines which actions on the API may trigger a Policy Execution. These are the supported activityKinds
:
WalletsTransferAsset
: Examine Policy Rules when the Transfer Assets from Wallet API is called
For legacy Asset Accounts, use the following:
PaymentInitiation
: Examine Policy Rules when the Initiate Payment API is called.TransactionInitiation
: Examine Policy Rules when the Broadcast Transaction API is called.CreatingSignature
: Examine Policy Rules when the Create Signature API is called.
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
Request body fields | Required/Optional | Description | Type |
---|---|---|---|
| Required | A name for the Policy | String |
| Required | A description for the Policy | String |
| Required | Determines which actions on the API may trigger a Policy Execution. See supported values above. | Enumerated Type |
| Required | Array of Policy Rule IDs to evaluate | Array of Strings |
| Required | Array of Policy Control IDs to apply | Array of Strings |
| Required | "Enabled", "Disabled" | Enumerated Type |
| Optional | Specify a list of entities to scope the policy to (eg. wallets) | Object |
Filter Object
Use the following fields in the nested filter
object to scope the policy to a specific entity:
Request body fields | Required/Optional | Description | Type |
---|---|---|---|
| Required | Specify: "Wallet" | Enumerated Type |
| Required | IDs of wallets the policy should apply to. | Array of Strings |
Request Example
Response
Response example
If successful, the response contains, among other things, a status indicating whether the rule has been enabled:
Last updated