Skip to main content
GET
/
accounts
/
{external_id}
Get Account
curl --request GET \
  --url https://api.example.com/accounts/{external_id}

Get Account

Returns details for a specific sub-account. The account must belong to the authenticated Prime Account.

Request

GET /accounts/:external_id

Path parameters

ParameterTypeDescription
external_idstringThe sub-account’s external ID (e.g., acc_2o0yiljtp378)

Examples

curl https://prime-api.legend.xyz/accounts/acc_2o0yiljtp378 \
  -H "Authorization: Bearer $LEGEND_QUERY_KEY"
Response
{
  "external_id": "acc_2o0yiljtp378",
  "signer_type": "eoa",
  "signer_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
  "legend_wallet_address": "0xc40897f38bc3d4e4d17f9daf46d2a13b4c47642f",
  "created_at": "2025-06-15T10:30:00Z"
}

Errors

StatusCodeDescription
404account_not_foundAccount doesn’t exist or belongs to a different Prime Account