# Get Subscription Beta

> The workspace's plan, subscription status, billing period, queued downgrade and usage.

> Documentation index: https://www.foxreach.io/docs/llms.txt lists every page of these docs. Each page is also served as Markdown: add `.md` to its URL.

`GET` https://api.foxreach.io/api/v1/billing/subscription

> **Note:** **Beta.** This endpoint is new and may change.

Requires an API key with the `read` scope.

Read only: nothing is created or changed, and no Stripe customer or subscription id is returned (`hasBillingAccount` only says a billing account exists, so the billing portal can open in the app). Use the app to change the plan or payment method.

**Request example**

```bash cURL
curl "https://api.foxreach.io/api/v1/billing/subscription" \
  -H "X-API-Key: otr_your_key"
```

```python Python
import requests

response = requests.get(
    "https://api.foxreach.io/api/v1/billing/subscription",
    headers={"X-API-Key": "otr_your_key"}
)
data = response.json()
```

```typescript TypeScript
const response = await fetch("https://api.foxreach.io/api/v1/billing/subscription", { method: "GET", headers: { "X-API-Key": "otr_your_key" } });
const data = await response.json();
```

**Response example**

```json
{
  "data": {
    "plan": "growth",
    "status": "active",
    "billingInterval": "annual",
    "currentPeriodEnd": "2027-01-05T10:00:00",
    "cancelAtPeriodEnd": false,
    "pendingPlan": null,
    "pendingPlanEffectiveAt": null,
    "graceEndsAt": null,
    "lifetimeGrant": false,
    "hasBillingAccount": true,
    "trial": null,
    "usage": {
      "contacts": {
        "used": 4210,
        "limit": 100000
      },
      "monthlyEmails": {
        "used": 18200,
        "limit": 100000
      },
      "aiCredits": {
        "used": 12,
        "limit": 500
      },
      "verificationCredits": {
        "balance": 840,
        "expiresAt": "2027-02-01T00:00:00"
      }
    }
  }
}
```

## Response fields

- `plan` string: The plan enforced for this workspace: `free`, `starter`, `growth` or `agency`. A workspace on a lifetime license or an owner-wide agency plan shows that plan.
- `status` string: `active`, `trialing`, `local_trial`, `past_due` or `canceled`.
- `billingInterval` string | null: `monthly` or `annual`; `null` with no recurring subscription, and for a trial without a Stripe subscription.
- `currentPeriodEnd` string | null: When the current billing period ends.
- `cancelAtPeriodEnd` boolean: `true` when the subscription ends at the period end.
- `pendingPlan` string | null: A downgrade queued for the end of the period, with `pendingPlanEffectiveAt`.
- `graceEndsAt` string | null: While `past_due`: when the grace period that keeps the paid limits runs out.
- `lifetimeGrant` boolean: `true` when a lifetime license is bound to this workspace.
- `trial` object | null: The open trial, or one that ended in the last two weeks. `null` when none.
- `usage` object: `contacts`, `monthlyEmails` and `aiCredits` as `{used, limit}` (`-1` is unlimited), `verificationCredits` as `{balance, expiresAt}`, and `leadFinderCredits` while Lead Finder is available.

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `read` |

## Rate Limit

- **300 requests per minute, shared by every `read` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`read`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](https://www.foxreach.io/docs/rate-limiting).
