API reference
Wallets
Account funding
Transactions
Policies
Create policy
Create a new policy.
POST
/
v1
/
policies
curl --request POST \
--url https://api.privy.io/v1/policies \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"version": "1.0",
"name": "Allowlisted stablecoins",
"chain_type": "ethereum",
"rules": [
{
"name": "Allowlist USDC contract on Base",
"method": "eth_sendTransaction",
"conditions": [
{
"field_source": "ethereum_transaction",
"field": "to",
"operator": "eq",
"value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
],
"action": "ALLOW"
},
{
"name": "Allowlist USDT contract on Base",
"method": "eth_sendTransaction",
"conditions": [
{
"field_source": "ethereum_transaction",
"field": "to",
"operator": "eq",
"value": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2"
}
],
"action": "ALLOW"
}
]
}'
{
"id": "tb54eps4z44ed0jepousxi4n",
"name": "Allowlisted stablecoins",
"chain_type": "ethereum",
"rules": [
{
"name": "Allowlist USDC contract on Base",
"method": "eth_sendTransaction",
"conditions": [
{
"field_source": "ethereum_transaction",
"field": "to",
"operator": "eq",
"value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
],
"action": "ALLOW"
},
{
"name": "Allowlist USDT contract on Base",
"method": "eth_sendTransaction",
"conditions": [
{
"field_source": "ethereum_transaction",
"field": "to",
"operator": "eq",
"value": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2"
}
],
"action": "ALLOW"
}
],
"owner_id": null,
"version": "1.0",
"created_at": 1741833088894
}
Authorizations
Basic Auth header with your app ID as the username and your app secret as the password.
Headers
ID of your Privy app.
Request authorization signature. If multiple signatures are required, they should be comma separated.
Body
application/json
Response
200 - application/json
Created policy object.
The response is of type object
.
curl --request POST \
--url https://api.privy.io/v1/policies \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"version": "1.0",
"name": "Allowlisted stablecoins",
"chain_type": "ethereum",
"rules": [
{
"name": "Allowlist USDC contract on Base",
"method": "eth_sendTransaction",
"conditions": [
{
"field_source": "ethereum_transaction",
"field": "to",
"operator": "eq",
"value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
],
"action": "ALLOW"
},
{
"name": "Allowlist USDT contract on Base",
"method": "eth_sendTransaction",
"conditions": [
{
"field_source": "ethereum_transaction",
"field": "to",
"operator": "eq",
"value": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2"
}
],
"action": "ALLOW"
}
]
}'
{
"id": "tb54eps4z44ed0jepousxi4n",
"name": "Allowlisted stablecoins",
"chain_type": "ethereum",
"rules": [
{
"name": "Allowlist USDC contract on Base",
"method": "eth_sendTransaction",
"conditions": [
{
"field_source": "ethereum_transaction",
"field": "to",
"operator": "eq",
"value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}
],
"action": "ALLOW"
},
{
"name": "Allowlist USDT contract on Base",
"method": "eth_sendTransaction",
"conditions": [
{
"field_source": "ethereum_transaction",
"field": "to",
"operator": "eq",
"value": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2"
}
],
"action": "ALLOW"
}
],
"owner_id": null,
"version": "1.0",
"created_at": 1741833088894
}
Assistant
Responses are generated using AI and may contain mistakes.