# Subscription

Manage your Linked API subscription programmatically: check status and view or adjust seats.

> The API Reference is also the SDK and CLI reference. Consecutive code fences marked `tab=HTTP`, `tab=Node`, `tab=Python` and `tab=CLI` are the same call on each surface (a fence marked `tab=HTTP,CLI` is the same text for both), and a block between `:::surface <names>` and `:::` applies only to the surfaces it names. Identifiers in the text are written as in Node and in HTTP JSON (camelCase); the Python SDK spells methods, parameters and result attributes in snake_case (`sendMessage` → `send_message`, `reconnectionLink` → `reconnection_link`), while names inside HTTP JSON stay camelCase.

Manage your Linked API subscription programmatically. For general Admin API information, see the [Admin overview](/docs/admin-overview).

## subscription.getStatus

Get current subscription status.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/subscription.getStatus \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here"
```

```typescript tab=Node
const status = await admin.subscription.getStatus();
```

```python tab=Python
status = admin.subscription.get_status()
```

```bash tab=CLI
linkedin admin subscription status
```

**Response:**

```json
{
  "success": true,
  "result": {
    "status": "active",
    "eligibleForTrial": false,
    "cancelAtPeriodEnd": false
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `status` | `string` or `undefined` | `active`, `trialing`, `past_due`, `unpaid`, `canceled`, or `undefined` if no subscription |
| `eligibleForTrial` | `boolean` | Whether a 7-day free trial is available for a one-seat first checkout |
| `cancelAtPeriodEnd` | `boolean` | Whether the subscription is scheduled to cancel at the end of the current billing period |

## subscription.getSeats

Get active subscription seats.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/subscription.getSeats \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here"
```

```typescript tab=Node
const { seats } = await admin.subscription.getSeats();
```

```python tab=Python
seats = admin.subscription.get_seats().seats
```

```bash tab=CLI
linkedin admin subscription seats
```

**Response:**

```json
{
  "success": true,
  "result": {
    "seats": [
      {
        "seatType": "plus",
        "quantity": 10,
        "billingPeriod": "year"
      }
    ]
  }
}
```

| Field | Type | Description |
|-------|------|-------------|
| `seatType` | `"core"` or `"plus"` | Seat tier. `plus` unlocks Sales Navigator actions (`nv.*`) and Recruiter Lite actions (`rc.*`) |
| `quantity` | `number` | Number of seats. Each seat allows one connected LinkedIn account |
| `billingPeriod` | `"month"` or `"year"` | Billing cycle |

## subscription.setSeats

Set the number of subscription seats. If you already have an active subscription, the quantity is updated immediately. If not, a Stripe checkout link is returned.

New users can start with a 7-day free trial when they do not have any previous trial or subscription history; a card is required to start it. The trial covers a single seat: a first checkout for more than one seat starts a regular paid subscription.

```bash tab=HTTP
curl -X POST https://api.linkedapi.io/admin/subscription.setSeats \
  -H "Content-Type: application/json" \
  -H "linked-api-token: linked_your_token_here" \
  -d '{
    "quantity": 5,
    "billingPeriod": "year",
    "seatType": "plus"
  }'
```

```typescript tab=Node
const { status, paymentLink } = await admin.subscription.setSeats({
  quantity: 5,
  billingPeriod: 'year',
  seatType: 'plus',
});
```

```python tab=Python
from linkedapi import SetSeatsParams

result = admin.subscription.set_seats(
    SetSeatsParams(quantity=5, billing_period="year", seat_type="plus")
)
```

```bash tab=CLI
linkedin admin subscription set-seats --quantity 5 --period year --type plus
```

:::surface cli
In the CLI the body fields are flags, all required:

| Flag | Body field | Values |
| --- | --- | --- |
| `--quantity` | `quantity` | 1–1000 |
| `--period` | `billingPeriod` | `month`, `year` |
| `--type` | `seatType` | `core`, `plus` |
:::

**Body:**

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `quantity` | `number` | Yes | Number of seats (1–1000) |
| `billingPeriod` | `"month"` or `"year"` | Yes | Billing cycle |
| `seatType` | `"core"` or `"plus"` | Yes | Seat tier |

**Response (subscription exists):**

```json
{
  "success": true,
  "result": {
    "status": "complete"
  }
}
```

**Response (no subscription, checkout required):**

```json
{
  "success": true,
  "result": {
    "status": "processing",
    "paymentLink": "https://checkout.stripe.com/..."
  }
}
```

> **Note:** When reducing seats below the number of connected accounts, excess accounts will be automatically frozen. Changes are applied in Stripe immediately but may take a few seconds to reflect in the API due to webhook processing.
