> ## Documentation index
> Fetch the complete documentation index at: https://docs.leadity.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get account

> Read the account's balance and what this key may do.

Answers the account this key belongs to: its credit balance, any credits expiring within seven days, whether it is still restricted to the starter packages, and the scopes this key carries. Call it first to learn whether the key may write or spend.

`GET https://api.leadity.io/v1/account`

- Scope: `read`
- Spends credits: no
- MCP tool: `get_account`

## Headers

- `Authorization`, string, required. Bearer, a space, then an API key: Bearer lk_api_... An MCP key is refused here with wrong_key_kind.

## Example request

```bash cURL
curl "https://api.leadity.io/v1/account" \
  -H "Authorization: Bearer $LEADITY_API_KEY"
```

```javascript Node.js
const response = await fetch("https://api.leadity.io/v1/account", {
  headers: {
    Authorization: `Bearer ${process.env.LEADITY_API_KEY}`,
  },
});

const data = await response.json();
console.log(data);
```

```python Python
import os

import requests

response = requests.get(
    "https://api.leadity.io/v1/account",
    headers={
        "Authorization": f"Bearer {os.environ['LEADITY_API_KEY']}",
    },
)

print(response.json())
```

## Response

- `id`, string, required. The account's id.
- `email`, string, required. The account's sign-in email address.
- `emailVerified`, boolean, required. Whether the email address is verified. Spending refuses email_not_verified until it is.
- `createdAt`, string, required. When the account was created. An ISO 8601 timestamp in UTC.
- `credits`, integer, required. The spendable balance, in credits.
- `paywalled`, boolean, required. True while the account may order only the two starter packages and the paid upgrades refuse with paywall_required. Any purchase lifts it.
- `expiringSoon`, object | null, required. Credits about to expire, or null when none expire within seven days. get_subscription has every expiry.
  - `credits`, integer, required. Credits that expire within the next seven days, at most the balance.
  - `firstExpiresAt`, string, required. When the first of them expires. An ISO 8601 timestamp in UTC.
- `key`, object, required. The key this call was made with.
  - `kind`, string, required. api for an HTTP API key, mcp for an MCP key. Each opens its own surface only. One of: `api`, `mcp`.
  - `displayPrefix`, string, required. The key's shown-again prefix, e.g. lk_api_Ab3d. Never enough to use it.
  - `scopes`, string[], required. What the key may do: read always, write and spend when ticked at creation. An operation outside them answers insufficient_scope. One of: `read`, `write`, `spend`.

## Example response

```json 200
{
  "id": "k7Qm2xRp9T",
  "email": "ops@acme-roofing.com",
  "emailVerified": true,
  "createdAt": "2026-08-14T09:21:44.000Z",
  "credits": 4820,
  "paywalled": false,
  "expiringSoon": {
    "credits": 1200,
    "firstExpiresAt": "2026-10-09T15:00:00.000Z"
  },
  "key": {
    "kind": "mcp",
    "displayPrefix": "lk_mcp_7fQ2",
    "scopes": [
      "read",
      "write",
      "spend"
    ]
  }
}
```

## Errors

Every refusal answers `{ error, message }` with the status below. The full list is on the [Errors](https://docs.leadity.io/errors) page.

| Code | Status | Meaning | Extra fields |
| --- | --- | --- | --- |
| `unauthorized` | 401 | The API key is missing, malformed, revoked or expired. | - |
| `wrong_key_kind` | 401 | This key opens the other surface: an API key works on the HTTP API, an MCP key on the MCP server. | - |
| `account_suspended` | 403 | The account is suspended. | - |
| `email_not_verified` | 403 | The account's email address is not verified yet. | - |
| `rate_limited` | 429 | Too many requests. Wait for the Retry-After seconds and try again. | `retryAfterSeconds`: The seconds to wait, the same number as the Retry-After header. |
| `try_again` | 503 | Leadity could not answer just now. Retry in a moment, with the same Idempotency-Key on a spending call. | `retryAfterSeconds`: When a request with this Idempotency-Key is still being processed: the seconds to wait before retrying with the same key, as the Retry-After header says. |
| `internal_error` | 500 | Something failed on our side. Nothing was charged twice. | `body`: On the MCP server, when Leadity answered in a shape the tool does not publish: that answer as it came. |
