# Introduction

KLCT is AI customer support and growth automation. Your account holds contacts, support tickets, live chat, calls, a customer portal with a changelog and feedback board, and the campaigns and sequences that act on them. This API gives another product the same access a teammate has, limited to what you grant.

There are three ways in, and they share one account model:

| Need | Use |
|---|---|
| Read and write your own account's data from a script or server | [REST API](authentication) with an **account API key** |
| Let your product connect to many customers' KLCT accounts | [REST API](oauth) with **OAuth 2.1** |
| Let an AI assistant such as Claude work inside an account | The [MCP connector](mcp) |

Everything is account-scoped. A token can only ever see the one KLCT account it belongs to, and asking for another account's record answers `404`, never `403`, so ids do not leak.

## Base URL and format

```
https://app.klctai.com/api
```

- Requests and responses are JSON. Send `Content-Type: application/json` on writes.
- Timestamps are ISO 8601 in UTC.
- Ids are integers. They are stable and never reused.
- Lists are paginated with `page` and `per_page` (default 50, maximum 100) and return a `meta` block with `current_page`, `last_page` and `total`.
- There is no version prefix today. Fields are only ever added. Treat unknown response fields as normal and ignore them.

## Make your first call

Generate a key (see [Authentication](authentication)), then:

```bash
curl "https://app.klctai.com/api/platform/account" \
  -H "Authorization: Bearer $KLCT_API_KEY"
```

```json
{ "account_id": 4821, "name": "Acme Dental", "billing_active": true, "setup_url": null }
```

Then list your newest contacts:

```bash
curl "https://app.klctai.com/api/contacts?per_page=5" \
  -H "Authorization: Bearer $KLCT_API_KEY"
```

## What you can build

- Create a support ticket or reply to a chat from your own app: [Tickets](reference#tickets), [Chat conversations](reference#chat-conversations).
- Keep contacts in step with your CRM or store: [Contacts](reference#contacts).
- Publish release notes from your pipeline to the customer portal: [Changelog](reference#changelog).
- Pull feedback votes and the roadmap into your own tools: [Feedback and roadmap](reference#feedback-and-roadmap).
- React in real time when a ticket, message or contact arrives: [Webhooks](webhooks).
- Start a KLCT sequence when something happens in your product: [Events](reference#events-and-webhooks).

## For AI tools

Every page here is also available as Markdown (add `.md` to the URL), the whole site is one file at `/developers/llms-full.txt`, and the API is described by an [OpenAPI 3.1 file](openapi.json) whose operation ids and descriptions are written to be used as tool definitions. See [Use with AI and MCP](mcp).
