Skip to content
External Console API

List Accounts

List every account this console token can reach. Call this first — it returns the ids every other External Console API endpoint needs.

GET https://console-api.siraya.ai/extapi/v1/accounts

Parameters

This endpoint takes no parameters.

Response Fields

id string
The account id. This is what you pass as account_id or accountIdFrom / accountIdTo elsewhere.
name string
The account's display name, as it appears in the console.
parent_id string
The parent account's id, or null for a root account.
is_root boolean
Whether this is a root account.
funding_type string

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.

is_archived boolean

Whether the account is archived. An archived account can neither send nor receive a credit transfer.

is_default boolean
Marks the account used when a request omits the account parameter. Repeated at the top level as default_account_id.
curl https://console-api.siraya.ai/extapi/v1/accounts \
  -H "Authorization: Bearer <CONSOLE_TOKEN>"
import requests

url = "https://console-api.siraya.ai/extapi/v1/accounts"
headers = {"Authorization": "Bearer <CONSOLE_TOKEN>"}

response = requests.get(url, headers=headers)
for account in response.json()["data"]:
    print(account["id"], account["name"], account["funding_type"])

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.