> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brale.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Get your custodial address_ids

> Use the Addresses API to retrieve your custodial address_id values, which are required for transfers and balance checks.

Use the Addresses API to fetch your custodial `address_id` values. These are required for transfers and balance checks.

**1. Prerequisite: get your account\_id and a bearer token**

* Get `account_id`: [How to get your account\_id](https://docs.brale.xyz/guides/how-to/get-your-account-id.md)
* Get a bearer token using your client credentials:

```bash theme={null}
curl --request POST \
  --url https://auth.brale.xyz/oauth2/token \
  --header 'Authorization: Basic ${BASE_64_OF(client_id:client_secret)}' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials
```

Use `Authorization: Bearer ${ACCESS_TOKEN}` for the next call.

**2. List your addresses**

Call `GET /accounts/{account_id}/addresses` to retrieve custodial and external addresses. Filter for `type=internal` to get custodial addresses managed by Brale.

```bash theme={null}
curl --request GET \
  --url "https://api.brale.xyz/accounts/${ACCOUNT_ID}/addresses" \
  --header "Authorization: Bearer ${ACCESS_TOKEN}"
```

Example response (truncated):

```json theme={null}
{
  "addresses": [
    {
      "id": "2MhCCIHulVdXrHiEuQDJvnKbSkl",
      "name": "Custodial",
      "status": "active",
      "type": "internal",
      "address": "0xB2952EDba91FeAeaDBeCC4030203367A5B9b4701",
      "transfer_types": [
        "avalanche",
        "ethereum",
        "base",
        "polygon",
        "solana"
      ]
    }
    // ...
  ]
}
```

**3. Pick the right address\_id**

* Use `id` from an entry with `type=internal` for onchain/offchain transfers and balance checks.
* Choose an address that supports the `transfer_type` you need (e.g., `base`, `solana`, `ethereum`).
* Keep this `address_id` for subsequent calls (e.g., transfers, balances).
* To re-fetch the latest details for a known address, call [`GET /accounts/{account_id}/addresses/{address_id}`](https://docs.brale.xyz/api-reference/brale/get-address).

> [!TIP]
>
> For balances, pair the `address_id` with both `transfer_type` and `value_type` in `GET /accounts/{account_id}/addresses/{address_id}/balance`.

> [!TIP]
>
> To find a specific registered onchain address, call `GET /accounts/{account_id}/addresses?address=0x...` with the exact onchain address. You can also filter by `type` and `transfer_type`.
