List Accounts
List every account this console token can reach. Call this first — it returns the ids every other External Console API endpoint needs.
https://console-api.siraya.ai/extapi/v1/accounts
Parameters
This endpoint takes no parameters.
Response Fields
account_id or
accountIdFrom / accountIdTo elsewhere.
null for a root account.
direct_transfer — the account holds a wallet of its own.
limit_quota — it holds no balance; its spending is debited from the
nearest direct_transfer ancestor. This determines whether the
account can send or receive a credit transfer.
Whether the account is archived. An archived account can neither send nor receive a credit transfer.
default_account_id.
Example Response
{
"isSuccess": true,
"data": [
{
"id": "11111111-2222-3333-4444-555555555555",
"name": "Acme",
"parent_id": null,
"is_root": true,
"is_archived": false,
"funding_type": "direct_transfer",
"is_default": true
},
{
"id": "66666666-7777-8888-9999-000000000000",
"name": "Team A",
"parent_id": "11111111-2222-3333-4444-555555555555",
"is_root": false,
"is_archived": false,
"funding_type": "limit_quota",
"is_default": false
}
],
"default_account_id": "11111111-2222-3333-4444-555555555555"
}
Ordering
Roots come first, then sub-accounts by creation order. The first entry is the
default and is repeated as default_account_id.
Live memberships
The list reflects your live memberships, not anything captured when the token was created. Losing membership removes the account on the next call, and joining a new one adds it with no need to reissue the token.
Selecting an account elsewhere
Every other endpoint takes an account parameter, and any id from this list is valid:
| Value | Reads |
|---|---|
| Omitted | default_account_id — the first account in the list |
| A root id | That root and all its sub-accounts |
| A sub-account id | That sub-account and its own branch |
| An id you are not a member of | 404 — never 403, so ids cannot be enumerated |
Permissions are enforced per selected account. A user who may read request logs in one account but not another is held to that on each call, because the permission is checked against the account actually being read.
A user with no active membership anywhere gets 403.