---
title: "Account"
method: GET
path: "/account"
tags: ["Account"]
---

# Account

`GET /account`

## Request

- Base URL: `https://api.onelence.com/v1`
- URL: `https://api.onelence.com/v1/account`
- Auth: one of:
  - OAuth 2 (authorization code, authorization URL `https://api.onelence.com/oauth/authorize`, token URL `https://api.onelence.com/oauth/token`, scopes: `account:read`)
  - HTTP bearer

The connected workspace, your role, the plan and what it unlocks, AI credit usage and links to the dashboard.

## Response `200`

Success.

- object
  - `object` 'account', required
  - `workspace` object, required
    - `id` number, required
    - `role` string, required
  - `connection` object, required
    - `app` string, nullable, required
    - `via` 'oauth' | 'personal_access_token', required
    - `scopes` string[], required
  - `subscription` object, required
    - `active` boolean, required
    - `plan` string, nullable, required
    - `status` string, nullable, required
    - `trial` boolean, required
    - `capabilities` string[], required
    - `locked_capabilities` string[], required
  - `ai_credits` object, nullable, required
    - `used` number, nullable, required
    - `remaining` number, nullable, required
    - `allocated` number, nullable, required
  - `links` object, required
    - `dashboard` string, required
    - `billing` string, required
    - `connected_apps` string, required

## Other responses

- `400`: Invalid input; `error.param` names the field.
- `401`: Missing, expired or revoked token. WWW-Authenticate points to the resource metadata.
- `402`: subscription_required or upgrade_required; the error carries billing_url.
- `403`: insufficient_scope or admin_required.
- `404`: Unknown endpoint, site, source or record.
- `429`: Rate limited. Retry after Retry-After seconds.
- `500`: OneLence could not complete the request.

---

[API](https://skmtc.dev/onelence/apis/onelence-api.md) · [All operations](https://skmtc.dev/onelence/apis/onelence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/onelence/apis/onelence-api/revisions/971c72fe9a42?raw)
