Getting Started

REST API Integration

Standard HTTPS + JSON. Bearer-token auth. The v1 API surface is intentionally narrow — one endpoint (POST /v1/chat), scoped per chatbot. CRUD endpoints live in the dashboard for now.

The endpoint

The v1 API exposes a single public endpoint:

text
POST https://services.chatmount.co/v1/chat

Send a message, receive the chatbot’s response. Optionally stream tokens, maintain a session, include source citations. Full reference: Chat with a chatbot.

Authentication

Bearer tokens. Generate a key per chatbot from the dashboard’s API tab (Plus tier or above). Pass it on every request via the Authorization header.

bash
curl https://services.chatmount.co/v1/chat \
  -X POST \
  -H "Authorization: Bearer cm_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message":"Hi!"}'
  • Keys are scoped to a single chatbot — the chatbot ID is implied by the key
  • Plus tier: 15 keys per chatbot max. Enterprise: 50 keys per chatbot
  • Optional IP allowlist per key — requests from other IPs return 403
  • Rotate keys via the dashboard; rotation invalidates the old key immediately
  • Never expose keys in client-side code — use the embed widget for browser usage

Your first request

The simplest call — send a message, get a response:

bash
curl https://services.chatmount.co/v1/chat \
  -X POST \
  -H "Authorization: Bearer cm_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "message": "What are your business hours?",
    "include_sources": true
  }'

Successful response:

json
{
  "message": "Our business hours are Monday through Friday, 9am to 5pm EST.",
  "sources": [
    { "url": "https://example.com/about", "title": "About Us" }
  ],
  "usage": {
    "credits_used": 1,
    "credits_remaining": 99
  }
}

Error handling

Errors return a JSON body with a human-readable message:

json
{
  "error": "Message must be between 1 and 2000 characters"
}
  • 200 — success
  • 400 — malformed request (bad JSON, message length out of range)
  • 401 — invalid or missing API key
  • 403 — key not authorized for this chatbot, or your IP isn’t in the allowlist
  • 429 — rate limited; back off and retry
  • 5xx — our problem; retry with exponential backoff

Rate limits

Per-key rate limits, plus a monthly credit pool shared with widget chat usage. Each request consumes 1 credit.

  • Plus — 60 req/min, 1,500 credits/month, 10,000 daily cap per chatbot.
  • Enterprise — 200 req/min, unlimited credits/month, 50,000 daily cap per chatbot.

Every response includes:

text
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1714581600

Related