v46

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-211591,0051.4 MB
Policies

Create Policy

Create a new policy.

post/v1/policies

Headers

privy-app-idstring required

ID of your Privy app.

privy-idempotency-keystring

Idempotency keys ensure API requests are executed only once within a 24-hour window.

Request body

chain_type'ethereum' | 'solana' | 'cosmos' | 'stellar' | 'sui' | 'aptos' | 'movement' | 'tron' | 'bitcoin-segwit' | 'bitcoin-taproot' | 'pearl' | 'near' | 'ton' | 'starknet' | 'spark' required

The wallet chain types.

namestring required

Name to assign to policy.

owner_idstring cuid2 nullable

The key quorum ID to set as the owner of the resource. If you provide this, do not specify an owner.

version'1.0' required

Version of the policy. Currently, 1.0 is the only version.

Example request

{
  "rules": [
    {
      "conditions": [
        {
          "field": "content"
        }
      ]
    }
  ]
}

Response

Created policy object.

chain_type'ethereum' | 'solana' | 'cosmos' | 'stellar' | 'sui' | 'aptos' | 'movement' | 'tron' | 'bitcoin-segwit' | 'bitcoin-taproot' | 'pearl' | 'near' | 'ton' | 'starknet' | 'spark' required

The wallet chain types.

created_atnumber required

Unix timestamp of when the policy was created in milliseconds.

idstring required

Unique ID of the created policy. This will be the primary identifier when using the policy in the future.

namestring required

Name to assign to policy.

owner_idstring cuid2 required

A unique identifier for a key quorum.

version'1.0' required

Version of the policy. Currently, 1.0 is the only version.

Example response

{
  "chain_type": "ethereum",
  "created_at": 1741833088894,
  "id": "tb54eps4z44ed0jepousxi4n",
  "name": "Allowlisted stablecoins",
  "owner_id": null,
  "rules": [
    {
      "action": "ALLOW",
      "conditions": [
        {
          "field": "to",
          "field_source": "ethereum_transaction",
          "operator": "eq",
          "value": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
        }
      ],
      "id": "bdyfoa65pro1eez6iwtzanol",
      "method": "eth_sendTransaction",
      "name": "Allowlist USDC contract on Base"
    }
  ],
  "version": "1.0"
}