# Get the current plan

`GET https://api.chat-data.com/api/v2/current-plan`

Canonical: https://www.chat-data.com/api-reference/get-current-plan

## Authentication

Send an API key as a Bearer token: `Authorization: Bearer $CHAT_DATA_API_KEY`. Workspace keys reach every chatbot in the workspace; chatbot-scoped keys reach only their chatbot. Keep keys on the server.

## Description

Get a summary of the workspace's current subscriptions and privileges.

This operation requires a workspace API key; chatbot-scoped keys get a 403.

## Example request

```bash
curl 'https://api.chat-data.com/api/v2/current-plan' \
  -H "Authorization: Bearer $CHAT_DATA_API_KEY"
```

## Example response (200)

```json
{
  "status": "success",
  "email": "jane@example.com",
  "name": "Jane Doe",
  "plan": {
    "subscriptions": {
      "free": 1,
      "entry": 0,
      "standard": 1,
      "professional": 0,
      "customize_plan_1": 0,
      "extra_chatbots": 0,
      "extra_messages": 0,
      "live_chat": 0,
      "remove_brand": 0,
      "remove_label": 0,
      "webhook_delivery": 0,
      "sso_login": 0,
      "storage": 0,
      "scrape": 0,
      "entry_legacy": 0
    },
    "remainingTrainingChars": 50000000,
    "refreshingTrainingChars": 110000000,
    "remainingCredits": 5000,
    "refreshingCredits": 10000,
    "chatbots": 2,
    "chatbotsLimit": 5,
    "chatbotCharactersLimit": 11000000,
    "gatherLeads": true,
    "customDomain": true,
    "api": true,
    "customModel": true,
    "userAnalysis": true,
    "shareAnalysis": true,
    "notification": true,
    "gpt4": true,
    "removeBrand": false,
    "files": 2560
  }
}
```

## Responses

| Status | Description |
| --- | --- |
| 200 | Successful response. |
| 400 | An unexpected error occurred while processing the request; `message` contains the error. |
| 401 | Authentication failed: the `Authorization` header is missing or not in the `Bearer <key>` format, the API key does not exist, its workspace is unavailable or has no owner, or the workspace's plan does not include API access. `message` says which. |
| 403 | The request used a chatbot-scoped API key. This operation needs a workspace key. |
| 429 | The workspace sent more than 600 API requests in the last minute. Wait the number of seconds given in the `Retry-After` header (and in `message`) before retrying. |
