Skip to main content
GET
/
v1
/
policies
/
{policy_id}
/
rules
/
{rule_id}
Get Policy Rule
curl --request GET \
  --url https://api.privy.io/v1/policies/{policy_id}/rules/{rule_id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'privy-app-id: <privy-app-id>'
{
  "id": "rule_123",
  "name": "Allowlist USDC contract on Base",
  "method": "eth_sendTransaction",
  "conditions": [
    {
      "field_source": "ethereum_transaction",
      "field": "to",
      "operator": "eq",
      "value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
    }
  ],
  "action": "ALLOW"
}

Documentation Index

Fetch the complete documentation index at: https://docs.privy.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Basic Auth header with your app ID as the username and your app secret as the password.

Headers

privy-app-id
string
required

ID of your Privy app.

Path Parameters

policy_id
string
required
Required string length: 24
rule_id
string
required
Required string length: 24

Response

200 - application/json

Requested policy rule object.

A rule that defines the conditions and action to take if the conditions are true.

name
string
required
Required string length: 1 - 50
method
enum<string>
required

Method the rule applies to.

Available options:
eth_sendTransaction,
eth_signTransaction,
eth_signUserOperation,
eth_signTypedData_v4,
eth_sign7702Authorization,
personal_sign,
wallet_sendCalls,
signTransaction,
signAndSendTransaction,
signMessage,
exportPrivateKey,
exportSeedPhrase,
signTransactionBytes,
earn_deposit,
earn_withdraw,
transfer,
*
conditions
(EthereumTransactionCondition · object | EthereumCalldataCondition · object | EthereumTypedDataDomainCondition · object | EthereumTypedDataMessageCondition · object | Ethereum7702AuthorizationCondition · object | SolanaProgramInstructionCondition · object | SolanaSystemProgramInstructionCondition · object | SolanaTokenProgramInstructionCondition · object | SystemCondition · object | TronTransactionCondition · object | TronCalldataCondition · object | SuiTransactionCommandCondition · object | SuiTransferObjectsCommandCondition · object | ActionRequestBodyCondition · object | AggregationCondition · object)[]
required

The verbatim Ethereum transaction object in an eth_signTransaction or eth_sendTransaction request.

action
enum<string>
required

The action to take when a policy rule matches.

Available options:
ALLOW,
DENY
id
string
required