Create a typed policy rule (limit, approval, or travel rule) for the specified wallet.
Required for ordinary rules. Approval defaults use OUTBOUND_INITIATED; an omitted or unspecified trigger is treated as outbound.
The asset ID the rule applies to. Unset means any asset (wildcard), which is legal only without an amount condition.
- Mock serverhttps://docs.ripple.com/_mock/pt-br/products/wallet/api-docs/palisade-api/palisade-api/v2/vaults/{vaultId}/wallets/{walletId}/policy-rules
- Sandbox server (uses TESTNET data, private keys and accounts)https://api.sandbox.palisade.co/v2/vaults/{vaultId}/wallets/{walletId}/policy-rules
- Palisade server (uses MAINNET data, private keys and accounts)https://api.palisade.co/v2/vaults/{vaultId}/wallets/{walletId}/policy-rules
curl -i -X POST \
'https://docs.ripple.com/_mock/pt-br/products/wallet/api-docs/palisade-api/palisade-api/v2/vaults/{vaultId}/wallets/{walletId}/policy-rules' \
-H 'Authorization: YOUR_API_KEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"trigger": "OUTBOUND_INITIATED",
"matchers": [
{
"type": "USER",
"value": "string",
"values": [
"string"
]
}
],
"assetId": "5:0xbehbehfb:USDC",
"definition": {
"kind": "LIMIT",
"limit": {
"amount": {
"threshold": "200.00",
"operator": "GTE",
"aggregation": "SINGLE_TX",
"duration": "86400s"
}
}
}
}'The wallet ID the rule applies to
The original creator ID. Null or absent when unknown for a projected legacy approval default; required for ordinary rules.
The transaction event the rule applies to. Approval defaults use OUTBOUND_INITIATED.
The asset ID the rule applies to. Unset means any asset (wildcard), which is legal only without an amount condition.
The policy rule status
The original creation time. Null or absent when unknown for a projected legacy approval default; required for ordinary rules.
The date and time the policy rule was updated
{ "id": "ce4918bf-a199-4ce2-85a3-d0d296855384", "vaultId": "ce4918bf-a199-4ce2-85a3-d0d296855384", "walletId": "ce4918bf-a199-4ce2-85a3-d0d296855384", "createdBy": "ce4918bf-a199-4ce2-85a3-d0d296855384", "trigger": "OUTBOUND_INITIATED", "matchers": [ { … } ], "assetId": "5:0xbehbehfb:USDC", "status": "RULE_ENABLED", "active": true, "createdAt": "2022-03-29T10:22:22.420Z", "updatedAt": "2022-03-29T10:22:22.420Z", "definition": { "kind": "LIMIT", "limit": { … } }, "scope": "WALLET" }