Skip to content

List the workspace's or your own AI accounts

GET
/connections/ai-accounts

Requires: connections.read

scope
required

org: the workspace’s accounts, used by every member’s tasks; me: the caller’s own, in this workspace.

string
Allowed values: org me

org: the workspace’s accounts, used by every member’s tasks; me: the caller’s own, in this workspace.

x-uai-org
string

Org scope: me or an org slug. Absent means the caller’s active/personal org. It selects the workspace used for permission checks and for most resource filters; operation-specific access rules still apply.

Successful response.

object
accounts
required
Array<object>
object
id
required
string
scope
required

org: the workspace’s accounts, used by every member’s tasks; me: the caller’s own, in this workspace.

string
Allowed values: org me
engine
required
string
label
required
string
position
required
integer
status
required
string
Allowed values: pending active needs_sign_in signed_out removed
authKind
required
string
rotating
required

A rotating sign-in; signing in again must use the same method.

boolean
billing
required

How it is paid for, told when it was signed in or pasted: a subscription sign-in or a provider API key. unknown: a Claude token added before Moondeck recorded this; signing in again tells. unverified: a billing class a runner hinted, or one whose writer was not recorded.

string
Allowed values: subscription api-key unknown unverified
expiresAt
required
Any of:
integer
refreshedAt
required
Any of:
integer
createdAt
required
integer
usage
Any of:

The account’s latest usage, as an engine CLI reported it while an agent ran on it. Moondeck never asks the provider itself.

object
status
required

As the engine last reported it.

string
Allowed values: allowed warning limited
state
required

As it reads now: a warning or limit whose reset time has passed is probably_reset. Without a top-level resetsAt, the windows at or above 75% used decide (every window, when none is at or above 75%): probably_reset once all of them are past their reset.

string
Allowed values: allowed warning limited probably_reset
resetsAt
required
Any of:
integer
usingOverage
required

Whether the engine says it is billing past the plan; null when it did not say.

boolean | null
windows
required
Array<object>
object
window
required

The engine’s name for the window: Claude’s five_hour, seven_day, …; Codex’s primary, secondary; Cursor’s included, api.

string
windowMinutes
required
Any of:
integer
usedPercent
required
Any of:
number
<= 100
resetsAt
required
Any of:
integer
probablyReset
required

Its reset time has passed, so the share is probably spent.

boolean
source
required
string
Allowed values: claude-rate-limit-event codex-rate-limits error-text cursor-period-usage
observedAt
required

When the engine said it, epoch ms.

integer
seenAgoMs
required

How long before this response the reading was taken.

integer
stale
required

The reading is more than a day old.

boolean
usageUnknown
required

When usage is null because the provider does not report account limits: e.g. “unknown — Grok doesn’t report account limits”. Otherwise null.

string | null
observed
required
Any of:

Rolling 5-hour and 7-day turn count and spend from Moondeck’s own ledger for engines that do not report account limits. Absolute figures only; no percent and no fake limit.

object
source
required
string
windows
required
Array<object>
object
window
required
string
Allowed values: five_hour seven_day
windowMinutes
required
integer
turns
required
integer
costUsd
required
number | null
pricedTurns
required
integer
observedAt
required
integer
connection
Any of:
object
providerType
required

openrouter: an OpenRouter key; bedrock: an Amazon Bedrock API key; custom: any endpoint that speaks the engine’s protocol.

string
Allowed values: openrouter bedrock custom
host
required

The endpoint’s host.

string
region
string
transport

Bedrock only: runtime (Claude Code, Codex) or mantle (Codex only).

string
Allowed values: runtime mantle
models
required
Array<object>
object
id
required
string
source
required
string
Allowed values: discovered manual
verifiedAt
required

When a turn on this model last succeeded; null = not tested yet.

string | null
price
Any of:
object
inputPerMtok
required
number
outputPerMtok
required
number
defaultModel
required
string
backgroundModel
required
string | null
expiresAt
Any of:
integer
expired
boolean
baseUrl

The full URL, only in the account’s own Settings listing.

string
internal

An internal-network connection: typed by hand, runs only on an owned runner serving the workspace.

boolean
budget
Any of:
object
state
required
string
managed
Any of:

The workspace’s credit for the Moondeck Managed Engine, which tasks fall back to.

object
balanceCents
required

Credit left, in minor units of currency.

integer
currency
required

The workspace’s billing currency, lowercase ISO 4217.

string

INVALID_REQUEST — a query parameter does not match the route’s query schema, or the same parameter was sent twice. A repeat is rejected rather than resolved: guards read the first value and a parsed object would keep the last.

object
error
required
object
code
required

Stable, machine-readable error code

string
message
required

Human-readable explanation

string
details
permission

Present on 403 — the permission the caller lacked

string
feature

Present on 402 — gated feature

string
limit

Present on 402 — the plan’s cap

number
plan

Present on 402 — the current plan

string
seats

Present on 402 when the cap is seat-derived

object
seats
required

Effective seats the cap was computed from

integer
seatsMax
required
Any of:
integer
perSeat
required

Units of the resource each seat carries

number
key
additional properties
any

UNAUTHORIZED — missing or invalid token, or an org-scoped API key (only user-scoped keys are accepted).

object
error
required
object
code
required

Stable, machine-readable error code

string
message
required

Human-readable explanation

string
details
permission

Present on 403 — the permission the caller lacked

string
feature

Present on 402 — gated feature

string
limit

Present on 402 — the plan’s cap

number
plan

Present on 402 — the current plan

string
seats

Present on 402 when the cap is seat-derived

object
seats
required

Effective seats the cap was computed from

integer
seatsMax
required
Any of:
integer
perSeat
required

Units of the resource each seat carries

number
key
additional properties
any

PLAN_LIMIT — the workspace’s plan does not include API access. Every API-key call can return this; session-token calls never do.

object
error
required
object
code
required

Stable, machine-readable error code

string
message
required

Human-readable explanation

string
details
permission

Present on 403 — the permission the caller lacked

string
feature

Present on 402 — gated feature

string
limit

Present on 402 — the plan’s cap

number
plan

Present on 402 — the current plan

string
seats

Present on 402 when the cap is seat-derived

object
seats
required

Effective seats the cap was computed from

integer
seatsMax
required
Any of:
integer
perSeat
required

Units of the resource each seat carries

number
key
additional properties
any

FORBIDDEN (lacking the required permission) or SCOPE_REQUIRED (no workspace, or a membership change in progress).

object
error
required
object
code
required

Stable, machine-readable error code

string
message
required

Human-readable explanation

string
details
permission

Present on 403 — the permission the caller lacked

string
feature

Present on 402 — gated feature

string
limit

Present on 402 — the plan’s cap

number
plan

Present on 402 — the current plan

string
seats

Present on 402 when the cap is seat-derived

object
seats
required

Effective seats the cap was computed from

integer
seatsMax
required
Any of:
integer
perSeat
required

Units of the resource each seat carries

number
key
additional properties
any

SCOPE_REQUIRED — the x-uai-org scope names a workspace that does not exist, or one the caller is not a member of. The two are deliberately indistinguishable: a 403 would confirm the workspace exists.

object
error
required
object
code
required

Stable, machine-readable error code

string
message
required

Human-readable explanation

string
details
permission

Present on 403 — the permission the caller lacked

string
feature

Present on 402 — gated feature

string
limit

Present on 402 — the plan’s cap

number
plan

Present on 402 — the current plan

string
seats

Present on 402 when the cap is seat-derived

object
seats
required

Effective seats the cap was computed from

integer
seatsMax
required
Any of:
integer
perSeat
required

Units of the resource each seat carries

number
key
additional properties
any

SCOPE_REQUIRED — membership reconciliation required, or membership verification unavailable.

object
error
required
object
code
required

Stable, machine-readable error code

string
message
required

Human-readable explanation

string
details
permission

Present on 403 — the permission the caller lacked

string
feature

Present on 402 — gated feature

string
limit

Present on 402 — the plan’s cap

number
plan

Present on 402 — the current plan

string
seats

Present on 402 when the cap is seat-derived

object
seats
required

Effective seats the cap was computed from

integer
seatsMax
required
Any of:
integer
perSeat
required

Units of the resource each seat carries

number
key
additional properties
any