API Routes

Reference for internal API endpoints.

Created: 1/4/2026

Admin Portal API Reference

The Admin Portal exposes several internal API endpoints to fetch data securely from the Privy Server API via the Target App credentials.

Users

List Users

Retrieves a paginated list of users from the server.

  • Endpoint: GET /api/users
  • Query Parameters:
    • query (optional): Filter users by ID, wallet address, email, username, or phone number.
// Response
{
  "users": [
    {
      "id": "did:privy:...",
      "linked_accounts": [...]
    }
  ]
}

Get User

Retrieves detailed information for a specific user.

  • Endpoint: GET /api/users/[id]
  • Parameters:
    • id: The user's Privy DID (e.g., did:privy:...).
// Response
{
  "user": { ... }
}

Delete User

Deletes a user from the application.

  • Endpoint: DELETE /api/users/[id]
  • Parameters:
    • id: The user's Privy DID.
// Response
{
  "success": true
}

Wallets

List Wallets

Retrieves a list of all connected wallets.

  • Endpoint: GET /api/wallets
  • Query Parameters:
    • query (optional): Filter wallets by wallet ID or address.
// Response
{
  "wallets": [
    {
      "id": "...",
      "address": "0x...",
      "chain_type": "ethereum"
    }
  ]
}

Get Wallet Details

Fetches balance and transaction history for a specific wallet context.

  • Endpoint: GET /api/wallets/[id]
  • Parameters:
    • id: The wallet's ID.
  • Query Parameters:
    • chain_type (required): The chain to fetch data for (e.g., ethereum, solana). This determines if it fetches ETH or SOL assets.
// Response
{
  "balance": "1.5",
  "transactions": [...]
}

Note: Balance and transaction fetching is currently supported only for ethereum and solana chain types.