list_accounts
[AdCP Accounts] List the accounts this credential can transact on.
This seller's account model is 'explicit': one API key IS one account, so this returns exactly one account — the partner behind the key. Use it to discover your account_id before any account-scoped call, and to confirm the account's status before you buy.
WHEN TO USE:
Discovering the account_id to pass to account-scoped tasks
Checking your account is 'active' before creating a media buy
Introspecting what your key is permitted to do (accounts[].authorization.allowed_tasks)
RETURNS:
accounts: AdCP Account objects (account_id, name, status, operator, brand, billing, account_scope) plus an authorization object naming the tasks this key may invoke
pagination: has_more is always false — one credential, one account
EXAMPLE: list_accounts({}) list_accounts({ status: "active" })
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by account status. Omit to return the account in any status. | |
| account | No | Exact account filter. Either account_id, or the natural key (brand.domain + operator). Returns empty when it does not match this credential's account — which is how you confirm the key you hold is the one you meant. | |
| context | No | ||
| sandbox | No | Filter by sandbox status — matched against the account's real state, not a stub. A sandbox account validates a buy exactly as a live one does (same errors, same codes) but books no placements and marks every response sandbox: true, so it is safe to exercise end to end. Sandbox is our classification, not buyer-settable: ask for a sandbox credential rather than sending sandbox on a live key. | |
| pagination | No |