---
title: "API Reference | WhisperChat REST API Documentation"
description: "The WhisperChat REST API reference: endpoints, request and response schemas, authentication and examples for querying and managing your chatbots."
canonical: "https://www.whisperchat.ai/docs/api"
last-updated: "2026-10-30"
source: "https://www.whisperchat.ai/docs/api"
---

# API Reference | WhisperChat REST API Documentation

> The WhisperChat REST API reference: endpoints, request and response schemas, authentication and examples for querying and managing your chatbots.

## The WhisperChat REST API

Create, train and query WhisperChat AI chatbots from your own code. Every endpoint lives under `https://api.whisperchat.ai`, takes and returns JSON, and is described by the [WhisperChat OpenAPI specification](https://www.whisperchat.ai/openapi.json). The interactive reference further down this page is generated from that same file.

**Base URL:** `https://api.whisperchat.ai`

**OpenAPI spec:** [https://www.whisperchat.ai/openapi.json](https://www.whisperchat.ai/openapi.json)

**MCP server:** [https://www.whisperchat.ai/mcp](https://www.whisperchat.ai/docs/mcp) the same capabilities over the Model Context Protocol, for Claude, ChatGPT, Cursor and other MCP clients.

**Plaintext for agents:** [https://www.whisperchat.ai/llms.txt](https://www.whisperchat.ai/llms.txt)

## WhisperChat API authentication

The WhisperChat API authenticates with an API key sent as a bearer token. Create a key in the WhisperChat dashboard under [API token](https://www.whisperchat.ai/chatbot/api-token), then send it in the `Authorization` header of every request. Requests without a valid key are rejected; keys are secrets, so keep them server-side. API access is available on the paid plans see [pricing](https://www.whisperchat.ai/pricing).

Authenticated request

```
curl https://api.whisperchat.ai/v1/chatbots \
  -H "Authorization: Bearer $WHISPERCHAT_API_KEY"
```

Ask a chatbot a question

```
curl https://api.whisperchat.ai/v1/chatbot/<chatbotId>/chat \
  -H "Authorization: Bearer $WHISPERCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "What are your opening hours?"}'
```

## WhisperChat API endpoints

Every endpoint in version 1.0.0 of the WhisperChat API. Expand any of them in the interactive reference below for parameters, request bodies and example responses.

### Chatbots

Operations related to chatbot management

-   GET[`/v1/chatbots`](https://www.whisperchat.ai/docs/api#tag/chatbots/get/v1/chatbots)Fetch all chatbots
-   POST[`/v1/chatbot`](https://www.whisperchat.ai/docs/api#tag/chatbots/post/v1/chatbot)Create Chatbot
-   GET[`/v1/chatbot/{chatbotId}`](https://www.whisperchat.ai/docs/api#tag/chatbots/get/v1/chatbot/{chatbotId})Fetch Chatbot
-   DELETE[`/v1/chatbot/{chatbotId}`](https://www.whisperchat.ai/docs/api#tag/chatbots/delete/v1/chatbot/{chatbotId})Delete Chatbot
-   PATCH[`/v1/chatbot/{chatbotId}/settings`](https://www.whisperchat.ai/docs/api#tag/chatbots/patch/v1/chatbot/{chatbotId}/settings)Update Chatbot Settings
-   POST[`/v1/chatbot/{chatbotId}/train`](https://www.whisperchat.ai/docs/api#tag/chatbots/post/v1/chatbot/{chatbotId}/train)Train Chatbot

### Sources

Operations related to chatbot knowledge sources

-   GET[`/v1/chatbot/{chatbotId}/urls`](https://www.whisperchat.ai/docs/api#tag/sources/get/v1/chatbot/{chatbotId}/urls)Fetch Source URLs
-   POST[`/v1/chatbot/{chatbotId}/url`](https://www.whisperchat.ai/docs/api#tag/sources/post/v1/chatbot/{chatbotId}/url)Create Source URL
-   DELETE[`/v1/chatbot/{chatbotId}/url/{urlId}`](https://www.whisperchat.ai/docs/api#tag/sources/delete/v1/chatbot/{chatbotId}/url/{urlId})Delete Source URL
-   GET[`/v1/chatbot/{chatbotId}/texts`](https://www.whisperchat.ai/docs/api#tag/sources/get/v1/chatbot/{chatbotId}/texts)Fetch All Source Texts
-   POST[`/v1/chatbot/{chatbotId}/text`](https://www.whisperchat.ai/docs/api#tag/sources/post/v1/chatbot/{chatbotId}/text)Create Source text
-   PATCH[`/v1/chatbot/{chatbotId}/text`](https://www.whisperchat.ai/docs/api#tag/sources/patch/v1/chatbot/{chatbotId}/text)Update Source text
-   GET[`/v1/chatbot/{chatbotId}/text/{textId}`](https://www.whisperchat.ai/docs/api#tag/sources/get/v1/chatbot/{chatbotId}/text/{textId})Fetch Source Text
-   DELETE[`/v1/chatbot/{chatbotId}/text/{textId}`](https://www.whisperchat.ai/docs/api#tag/sources/delete/v1/chatbot/{chatbotId}/text/{textId})Delete Source Text
-   GET[`/v1/chatbot/{chatbotId}/qas`](https://www.whisperchat.ai/docs/api#tag/sources/get/v1/chatbot/{chatbotId}/qas)Fetch All Source QAs
-   POST[`/v1/chatbot/{chatbotId}/qa`](https://www.whisperchat.ai/docs/api#tag/sources/post/v1/chatbot/{chatbotId}/qa)Create Source QA
-   PATCH[`/v1/chatbot/{chatbotId}/qa`](https://www.whisperchat.ai/docs/api#tag/sources/patch/v1/chatbot/{chatbotId}/qa)Update Source QA
-   GET[`/v1/chatbot/{chatbotId}/qa/{QAId}`](https://www.whisperchat.ai/docs/api#tag/sources/get/v1/chatbot/{chatbotId}/qa/{QAId})Fetch Source QA
-   DELETE[`/v1/chatbot/{chatbotId}/qa/{QAId}`](https://www.whisperchat.ai/docs/api#tag/sources/delete/v1/chatbot/{chatbotId}/qa/{QAId})Delete Source QA
-   POST[`/v1/chatbot/{chatbotId}/url/fetch`](https://www.whisperchat.ai/docs/api#tag/sources/post/v1/chatbot/{chatbotId}/url/fetch)Fetch URL Data

### Sessions

Operations related to chatbot conversation sessions

-   GET[`/v1/chatbot/{chatbotId}/sessions`](https://www.whisperchat.ai/docs/api#tag/sessions/get/v1/chatbot/{chatbotId}/sessions)Fetch Chatbot Sessions
-   GET[`/v1/chatbot/{chatbotId}/session/{sessionId}`](https://www.whisperchat.ai/docs/api#tag/sessions/get/v1/chatbot/{chatbotId}/session/{sessionId})Fetch Chatbot Session
-   POST[`/v1/chatbot/{chatbotId}/chat`](https://www.whisperchat.ai/docs/api#tag/sessions/post/v1/chatbot/{chatbotId}/chat)Send Message to Chatbot

## WhisperChat API errors

Every failure is JSON with the same shape, whatever the status code, so a client can branch on `error.code` instead of parsing prose. `hint` says what to do about it.

Error response

```
{
  "success": false,
  "message": "No valid API key found in 'Authorization' header",
  "error": {
    "code": "INVALID_API_KEY",
    "message": "No valid API key found in 'Authorization' header",
    "hint": "Send a valid API key as `Authorization: Bearer <token>`."
  }
}
```

-   `400``BAD_REQUEST`Malformed body or missing parameter
-   `401``INVALID_API_KEY`Missing, malformed or revoked key
-   `402``SUBSCRIPTION_REQUIRED`The plan does not include API access
-   `404``NOT_FOUND`No such chatbot, source or route
-   `429``RATE_LIMITED`Too many requests see Retry-After
-   `500``TECHNICAL_ERROR`Server-side failure; safe to retry once

## WhisperChat API versioning and deprecation

The version is in the path: every endpoint lives under `/v1`. Within a version we only add new endpoints, new optional parameters, new response fields so a client that ignores unknown fields keeps working.

A breaking change ships as a new version path (`/v2`), never as a change to `/v1`.

When a version is scheduled for removal its responses carry the `Deprecation` and `Sunset` headers (RFC 8594) naming the retirement date, and the same notice appears in the [changelog](https://www.whisperchat.ai/changelog). We aim to give at least six months between that first header and the shutdown.

Rate limits are reported on every response as `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset`, with `Retry-After` on a 429 throttle from the headers rather than from a fixed guess.

## Interactive API reference

The interactive WhisperChat API reference, generated from the OpenAPI specification. Expand any endpoint for parameters, request bodies and example responses.
