This guide walks you through creating an entity-owned custodial account in Sandbox, adding test balances in the CDP Portal, and checking balances with the CDP CLI. For Sandbox API keys and environment basics, see the Sandbox quickstart. Base API URL (Sandbox):Documentation Index
Fetch the complete documentation index at: https://docs.cloud.coinbase.com/llms.txt
Use this file to discover all available pages before exploring further.
https://sandbox.cdp.coinbase.com
Prerequisites
- A CDP login with access to the CDP Portal
- Node.js 22 or later
- A Sandbox API key JSON from the Portal (Sandbox environment, Accounts permission enabled)
1. Install CDP CLI
CDP CLI handles JWT authentication for you — configure your API key once and it signs requests.Node.js 22 or later is required.
-e sandbox on commands below if your default environment is not sandbox, or run cdp env sandbox to switch context. More detail: CDP CLI quickstart.
2. Create an account (API)
Create a named entity account withPOST /v2/accounts. Optionally add an idempotency header so retries return the same result; see Idempotency.
Example response
Example response
accountId from the response (for example account_af2937b0-9846-4fe7-bfe9-ccc22d935114). You use it in the Portal and in the verify step below.
cdp api paths are relative to the Sandbox platform base https://sandbox.cdp.coinbase.com/platform/v2. If cdp api fails with a host or path error, configure the URL explicitly: cdp env sandbox --key-file ~/Downloads/cdp_api_key.json --url https://sandbox.cdp.coinbase.com/platform/v2. See How it works.3. Create and fund the account through the Portal
Sandbox does not move real funds. You add simulated balances in the Portal:
4. Verify balance(s)
cdp accounts list and cdp accounts balance ship in recent @coinbase/cdp-cli releases. If your CLI reports an unknown command, run npm install -g @coinbase/cdp-cli@latest, then try again. You can always use cdp api "/accounts/$ACCOUNT_ID/balances" -e sandbox as a fallback; see List balances for account.What to read next
Custodial wallets overview
Concepts: custody model, ownership, and how accounts connect to payments
CDP CLI how it works
Environments and
cdp api field syntaxSandbox: Deposit destinations
Generate inbound addresses tied to an account
Accounts API reference
REST reference for account and balance endpoints