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

# Line Plan Limits

> Read how many phone and email lines your plan allows, how many you already have, and whether another one can be created. Pre-flight for POST /api/line-requests.

<Note>
  Call this **before** [`POST /api/line-requests`](/api-reference/endpoint/create-line-request) to
  know whether a new line is included, needs payment, or is not allowed at all on the current plan.
</Note>

## Authentication

Pass your workspace API key as a Bearer token, or use a Clerk session token.

```bash theme={null}
Authorization: Bearer tuco_xxxxxxxxxxxxx
```

***

## Example

```bash theme={null}
curl "https://app.tuco.ai/api/lines/limits" \
  -H "Authorization: Bearer tuco_xxxxxxxxxxxxx"
```

### Success (`200 OK`)

```json theme={null}
{
  "plan": "starter",
  "planName": "Starter",
  "limits": {
    "maxPhoneLines": 1,
    "maxEmailLines": 0,
    "maxPhoneAddons": 0,
    "maxEmailAddons": -1,
    "effectiveMaxPhoneLines": 1,
    "effectiveMaxEmailLines": 0
  },
  "addons": {
    "currentPhoneAddonQuantity": 0,
    "currentEmailAddonQuantity": 0,
    "remainingPurchasablePhoneAddons": 0,
    "remainingPurchasableEmailAddons": -1
  },
  "current": { "phoneLines": 1, "emailLines": 1 },
  "canCreatePhone": false,
  "canCreateEmail": true
}
```

<Warning>
  **`-1` means unlimited**, not zero. Check for `-1` before comparing a count against a limit.
</Warning>

## Response

<ResponseField name="plan" type="string | null">Plan id, e.g. `starter`. `null` when there is no active subscription.</ResponseField>
<ResponseField name="planName" type="string">Human-readable plan name.</ResponseField>

<ResponseField name="limits" type="object">
  Plan ceilings. `effectiveMaxPhoneLines` / `effectiveMaxEmailLines` already include purchased
  add-ons — compare against those, not the raw max.
</ResponseField>

<ResponseField name="addons" type="object">
  Add-ons bought so far and how many more can still be bought.
</ResponseField>

<ResponseField name="current" type="object">
  `phoneLines` and `emailLines` the workspace has today.
</ResponseField>

<ResponseField name="canCreatePhone" type="boolean">Whether a phone line can be created right now.</ResponseField>
<ResponseField name="canCreateEmail" type="boolean">Whether an email line can be created right now.</ResponseField>
<ResponseField name="error" type="string">Only present when there is no active subscription: `"No active subscription"`, with every limit `0` and both `canCreate*` flags `false`.</ResponseField>

***

## Errors

| Status | When | Body |
| - | - | - |
| `400` | Key has no active workspace | `{ "error": "No active workspace" }` |
| `401` | Missing or invalid API key | `{ "error": "Unauthorized" }` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.