Your first request
Set your sandbox key in an environment variable so it never appears in code:
export IDEALX_API_KEY="idx_test_…"export IDEALX_API="https://api.staging.idealx.com"Public API: list your accounts
Section titled “Public API: list your accounts”GET /v1/accountsAccounts you have a role on returns every account you have a role on, with its portfolios.
curl "$IDEALX_API/v1/accounts" \ -H "Authorization: Bearer $IDEALX_API_KEY"// Node 18+ (fetch is built in)const base = process.env.IDEALX_API ?? "https://api.staging.idealx.com";
const res = await fetch(`${base}/v1/accounts`, { headers: { Authorization: `Bearer ${process.env.IDEALX_API_KEY}` },});if (!res.ok) { const { error } = await res.json(); throw new Error(`${res.status} ${error.code}: ${error.message} (${error.requestId})`);}const { accounts } = await res.json();for (const a of accounts) console.log(a.id, a.name, a.currency, a.portfolios.length);import osimport requests
base = os.environ.get("IDEALX_API", "https://api.staging.idealx.com")res = requests.get( f"{base}/v1/accounts", headers={"Authorization": f"Bearer {os.environ['IDEALX_API_KEY']}"}, timeout=30,)if not res.ok: error = res.json()["error"] raise RuntimeError(f"{res.status_code} {error['code']}: {error['message']} ({error['requestId']})")for a in res.json()["accounts"]: print(a["id"], a["name"], a["currency"], len(a["portfolios"]))The answer:
HTTP/1.1 200 OKContent-Type: application/jsonRateLimit-Limit: 120RateLimit-Remaining: 119RateLimit-Reset: 42{ "accounts": [ { "id": "acc_01937c4e8a2b7d1f9e0c3b5a6d7e8f90", "name": "Sam Taylor", "nickname": null, "accountTypeId": "individual", "accountTypeLabel": "Individual", "jurisdiction": "AU", "currency": "AUD", "status": "open", "myRoles": [{ "role": "owner", "label": "Owner" }], "portfolios": [ { "id": "ptf_01937c4e8a2b7d1f9e0c3b5a6d7e8fa1", "name": "Primary", "isPrimary": true, "status": "open" }, { "id": "ptf_01937c4e8a2b7d1f9e0c3b5a6d7e8fa2", "name": "Long term", "isPrimary": false, "status": "open" } ], "openedAt": "2026-03-02T01:14:09.000Z" } ]}Next: read the account’s balances with GET /v1/accounts/{id}/detail and its investments with
GET /v1/accounts/{id}/positions. The journey
See my portfolio and performance walks through them.
Console API: list your clients
Section titled “Console API: list your clients”Firm endpoints take your firm id in the path; it is shown in Console under Team → API and webhooks.
GET /v1/firms/{firmId}/clientsClients you can see lists the clients the key’s admin can see.
export IDEALX_FIRM_ID="frm_…"curl "$IDEALX_API/v1/firms/$IDEALX_FIRM_ID/clients" \ -H "Authorization: Bearer $IDEALX_API_KEY"const base = process.env.IDEALX_API ?? "https://api.staging.idealx.com";const firmId = process.env.IDEALX_FIRM_ID;
const res = await fetch(`${base}/v1/firms/${firmId}/clients`, { headers: { Authorization: `Bearer ${process.env.IDEALX_API_KEY}` },});const { clients } = await res.json();console.table(clients.map((c) => ({ id: c.id, name: c.name, status: c.status })));import osimport requests
base = os.environ.get("IDEALX_API", "https://api.staging.idealx.com")firm_id = os.environ["IDEALX_FIRM_ID"]res = requests.get( f"{base}/v1/firms/{firm_id}/clients", headers={"Authorization": f"Bearer {os.environ['IDEALX_API_KEY']}"}, timeout=30,)res.raise_for_status()for c in res.json()["clients"]: print(c["id"], c["name"], c["status"]){ "clients": [ { "id": "crl_01937d0a5b6c7d8e9f0a1b2c3d4e5f60", "personId": "per_01937d0a5b6c7d8e9f0a1b2c3d4e5f61", "name": "Alex Morgan", "email": "alex.morgan@example.com", "path": "invited", "status": "active", "verified": true, "signedIn": true, "createdAt": "2026-05-11T22:40:03.000Z" } ]}When something goes wrong
Section titled “When something goes wrong”Every error has the same shape. Switch on error.code, log error.requestId:
{ "error": { "code": "unauthenticated", "message": "That API key is not valid here", "requestId": "req_01937d…" } }See Errors and the error catalogue.