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

# API introduction

> Two HTTP APIs for building on CustomerGPT: the Actions API for everything, and a small REST API for chatbots.

CustomerGPT has two HTTP APIs. Both live under the same base URL and use the same [API keys](https://customergpt.ai/docs/api-reference/authentication.md).

```text theme={null}
https://api.customergpt.ai/api
```

| API | What it covers | Use it when |
| - | - | - |
| [Actions API](https://customergpt.ai/docs/api-reference/actions/overview.md) | Everything: chatbots, knowledge sources, training, custom responses, conversations, replies, analytics, API keys, team, onboarding | You're building an integration or automation. The [CLI](https://customergpt.ai/docs/cli/overview.md), the [SDK](https://customergpt.ai/docs/developers/sdk.md) and the [MCP server](https://customergpt.ai/docs/developers/mcp.md) all use it. |
| [Chatbots REST API](https://customergpt.ai/docs/api-reference/rest/list-chatbots.md) | Create, list, read and update chatbots | You only need to manage chatbots and prefer plain REST. |

The API is available on the Growth, Scale and Enterprise plans.

## Make your first request

List your chatbots with the Actions API:

```bash theme={null}
curl https://api.customergpt.ai/api/v1/agents/actions/chatbots_list \
  -H "X-Api-Key: $CUSTOMERGPT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"page": 1, "limit": 25}'
```

```json theme={null}
{
  "ok": true,
  "data": {
    "items": [
      {
        "id": "e8503caf-9761-4a69-a3bf-b677718d19cf",
        "name": "Acme Support",
        "websiteUrl": "https://acme.com",
        "widgetId": "YOUR_WIDGET_ID"
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 25
  }
}
```

The same list with the REST API:

```bash theme={null}
curl https://api.customergpt.ai/api/v1/chatbots \
  -H "X-Api-Key: $CUSTOMERGPT_API_KEY"
```

## Conventions

* **JSON in, JSON out.** Send `Content-Type: application/json`.
* **Changes need confirmation.** In the Actions API, an action that changes data runs only with `"confirm": true`, and `"dryRun": true` checks it without changing anything. See [How actions work](https://customergpt.ai/docs/api-reference/actions/overview.md).
* **Rate limit.** The Actions API allows 120 requests per minute per API key. Requests without a key are counted per IP address.
* **Request IDs.** Every response has an `X-Request-Id` header. Include it when you contact [support@customergpt.ai](mailto:support@customergpt.ai) about a failed request.
* **Keys stay on your server.** The widget's embed code uses a public Widget ID, not an API key. Never put an API key in a web page or a mobile app.

## Machine-readable descriptions

* **OpenAPI 3.1** for the Actions API: `https://api.customergpt.ai/api/agents/openapi.json`
* **Action catalog** with a JSON Schema for every action's input: `https://api.customergpt.ai/api/v1/agents/actions`. See [List actions](https://customergpt.ai/docs/api-reference/actions/list.md).


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