Privy API Reference

website·Indexed 39 days ago

https://docs.privy.io/

API documentation for Privy, featuring endpoints for account management, condition sets, aggregations, and fiat/crypto operations. Includes tools for managing KYC/KYB verification, external fiat accounts, and securing requests with authorization signatures and idempotency keys.

Tokens
542.7K
Snippets
2.1K
Records
3.2K
Agent score
70%

What's inside Privy

  1. Overview of Privy KYC verification with Bridge

    Privy uses Bridge to verify individual users. The process is handled via hosted flows where Privy manages the Bridge customer creation and links it to the Privy user ID. The KYC process consists of two primary steps: first, the user must accept Bridge's terms of service via a hosted link, and second, the user must submit identity information through a hosted verification flow. Before starting, you must register a Bridge API key with Privy.
  2. Overview of Privy Smart Wallets

    Privy provides programmable, on-chain smart wallets based on the ERC-4337 account abstraction standard. These wallets allow developers to implement advanced features such as gas sponsorship and batched transactions. Assets are held by a smart contract, which is controlled by a Privy non-custodial embedded signer (an externally-owned account).

    Key Constraints:

    • Native smart wallet integration is currently only available in the React and React Native SDKs.
    • For wallets created via server-side SDKs or APIs, a different configuration process is required.
  3. Overview of mobile account transfer flow

    Account transfer allows users to move a login method from an orphaned account (an account with only one login method) to their currently authenticated account. This is only available on Privy iOS and Android native SDKs.

    Prerequisites: Login method transfer must be enabled in the Privy Dashboard under User management > Authentication > Login method transfer.

    Critical Warning: Transferring a login method does NOT transfer the embedded wallet from the orphaned account. Any assets in the orphaned account's wallet will be lost. Users should be warned about this before confirming a transfer.

    The Flow:

    1. Call a link or linkWithCode method.
    2. If a transfer conflict occurs, the SDK returns a nonce and ConflictingUserMetadata.
    3. Prompt the user for confirmation using the metadata.
    4. Re-prove ownership of the login method (new OTP, OAuth flow, or signature).
    5. Call the corresponding transferWithCode or transferAccount method using the nonce.
  4. Overview of Privy Denylist functionality

    Privy's denylist allows applications to block specific users from logging in or creating accounts. This is typically used to block malicious users or those violating terms of service.

    Supported blocking criteria:

    • Email addresses (e.g., user@example.com)
    • Email domains (e.g., @example.com)
    • Phone numbers
    • EVM wallet addresses
    • Solana wallet addresses

    Constraints: Denylists only apply to email, SMS, wallet, and OAuth methods with verified emails. Login methods such as Telegram and Farcaster are not supported.

  5. Overview of Hyperliquid Agent Wallets

    Agent wallets (also known as API wallets) are permissioned signers that do not hold funds but are authorized to execute Hyperliquid actions for a master account and its subaccounts. They provide several architectural benefits:

    • Key Isolation: Keep user keys isolated while trading programmatically.
    • Nonce Management: Each bot or strategy gets its own nonce space, simplifying concurrent operations.
    • Key Rotation: Rotate API keys without affecting the main trading account.
    • Account Continuity: Preserve consolidated fee tiers and account-level PnL.
  6. Overview of Condition Sets

    Condition sets are reusable lists of values that can be referenced in policy conditions. They allow developers to manage allowlists or denylists (e.g., approved recipient addresses) without hardcoding values directly into policy rules. This enables updates to the value lists without redeploying policies.

    Key components include:

    • Condition Sets: The named list container.
    • Condition Set Items: Individual values within a set.
    • Policy Conditions: Boolean statements that evaluate RPC requests against these sets.
  7. Overview of Privy Global Wallets

    Global wallets allow users to use a single embedded wallet identity across multiple Privy-powered applications. This creates a cross-app ecosystem where users can port wallets between apps, move assets, prove ownership, sign messages, and send transactions using existing wallets. Integration can be achieved through wallet connector solutions like RainbowKit and wagmi.
  8. Overview of Privy REST API resources

    The Privy REST API provides low-level access to interact directly with the following resources:

    • Users: Create user objects, link accounts, and pregenerate wallets.
    • Wallets: Create, update, and manage wallets across blockchains.
    • Authorization keys: Manage keys used to control wallets.
    • Policies: Create and manage policies tied to wallets.
    • Webhooks: Subscribe to and react to Privy events.
  9. Overview of Privy MFA Enrollment

    Privy allows users to secure their embedded wallets using Multi-Factor Authentication (MFA). Enrolling a user in MFA does not automatically verify them for wallet operations; it ensures that subsequent wallet actions will require MFA verification.

    Supported MFA methods include:

    • SMS: 6-digit code sent to a phone number.
    • TOTP: 6-digit code from an authenticator app (e.g., Google Authenticator, Authy).
    • Passkey: Biometric or device-based authentication using a registered passkey.
  10. Overview of Privy Single Sign-On (SSO)

    Single Sign-On (SSO) allows team members to access the Privy dashboard using corporate credentials from an organization's identity provider. SSO is available as an add-on for all plan tiers and integrates with Privy's role-based access control. When enabled, users with email addresses from a verified domain are automatically redirected to the identity provider during login.
  11. Overview of Privy Treasury capabilities

    Privy's treasury system allows businesses to manage digital assets for core operations such as payment orchestration, funds disbursement, and balance sheet capital. It provides a framework to codify authorization rules and execution constraints into wallet infrastructure, ensuring funds move only within defined boundaries. Key capabilities include:

    • Automated operations with human escalation: Programmatic execution for routine tasks with quorum sign-off for sensitive actions.
    • Multi-party treasury management: Distributed control using m-of-n authorization and policy constraints.
    • High-throughput protocol execution: Use of parallel wallet fleets to avoid nonce bottlenecks during DeFi or bridge interactions.
  12. Overview of issuing debit cards with Bridge and Stripe Issuing

    You can issue debit cards that spend stablecoins directly from a wallet by combining Stripe Issuing and Bridge. In this architecture, Stripe Issuing handles the physical/virtual card creation, while Bridge manages customer identity, KYC, and the onchain fund-pulling mechanism. When a purchase is made, Bridge pulls funds from the linked wallet via an onchain approval.

    Prerequisites for integration:

    1. A Bridge account with users verified via KYC/KYB.
    2. A Stripe account. You must use the Stripe App Install Link provided by Bridge to associate the Bridge Developer with your Stripe account and activate Stripe Issuing.