AccountAccount context

GET /v1/account

Return the account an API token acts on, plus the caller's role. Reachable without an active subscription.

curl https://api.botect.ai/v1/account \
  -H "Authorization: Bearer YOUR_ACCOUNT_TOKEN"
{
  "id": 9,
  "name": "Acme Inc",
  "slug": "acme",
  "is_personal": false,
  "role": "owner"
}

Returns the account the API token is bound to, and the authenticated user's role within it. Reachable without an active subscription, so a no-plan account can still introspect itself.

GET https://api.botect.ai/v1/account

Authentication

Account API token via Authorization: Bearer <token>. The account is resolved from the token's immutable binding; a broken binding fails closed with 403 rather than silently resolving to another account. See Authentication.

Example

Response fields

idinteger
Required
The account ID.
namestring
Required
The account name.
slugstring
Required
URL-safe account slug.
is_personalboolean
Required
Whether this is a personal account.
rolestring | null
Required
The authenticated user's role in the account (e.g. owner, member).

Errors

StatuscodeWhen
401UNAUTHENTICATEDMissing / bad account token
403The token is not bound to an accessible account