Policies

Get a policy by policy ID.

get/v1/policies/{policy_id}

Request

  • Base URL
    https://api.privy.io
  • URL
    https://api.privy.io/v1/policies/{policy_id}
  • Auth
    HTTP basic

Path parameters

policy_idstring required

Headers

privy-app-idstring required

ID of your Privy app.

Response

Requested policy object.

version'1.0' required

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

namestring required

Name to assign to the policy, up to 100 characters.

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

The wallet chain types.

idstring required

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

owner_idstring cuid2 required

A unique identifier for a key quorum.

created_atnumber required

Unix timestamp of when the policy was created in milliseconds.

Example response

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

Changes

    • warning

      added the new earn_incentive_claim enum value to the // response property for the response status

    • breaking

      the response property's maxLength was increased from 50 to 100 for the response status