logoRocketFlow

API Reference

Programmatic access to RocketFlow — public endpoints, MCP server, and webhooks

API Reference

RocketFlow offers two programmatic surfaces today:

  1. The MCP server — the recommended way to manage chatbots, read analytics, sessions, leads, and tickets from code or AI assistants. Authenticated with API keys. See the MCP Server docs.
  2. Public widget endpoints — the unauthenticated endpoints the chat widget itself uses. They are stable and documented below for advanced integrations (custom chat UIs, health monitoring).

A full standalone REST API with per-endpoint API-key auth is on the roadmap but not available yet.

Authentication

  • Public endpoints (below) require no API key. The chat endpoint is gated by your chatbot's allowed domains instead: requests are accepted based on their Origin when domain restrictions are configured.
  • MCP server requests require an API key passed as a Bearer token. Generate keys in Dashboard → Settings → API Keys — they are prefixed rkt_, stored as SHA-256 hashes, and shown in full only once at creation.

Public Endpoints

Base host: https://app.getrocketflow.io

MethodPathDescription
GET/api/public/healthcheckService health check
GET/api/public/chatbot/{chatbotId}Public chatbot configuration (name, colors, welcome message, suggested messages, …)
GET/api/public/chatbot/{chatbotId}/faqsThe chatbot's FAQ entries
GET/api/public/chatbot/{chatbotId}/knowledgeKnowledge portal content
POST/api/public/chatSend a chat message (streaming response)

Chat endpoint

POST /api/public/chat accepts a JSON body in the AI SDK UI message format:

{
  "chatbotId": "your-chatbot-id",
  "sessionId": "unique-session-id",
  "messages": [
    {
      "id": "m1",
      "role": "user",
      "parts": [{ "type": "text", "text": "Hello!" }]
    }
  ]
}

The response is a UI message stream (server-sent events) rather than a single JSON object — the same protocol the AI SDK's useChat consumes. If you are building a custom chat UI, use the AI SDK client libraries to consume it rather than parsing the stream by hand.

curl -N -X POST https://app.getrocketflow.io/api/public/chat \
  -H "Content-Type: application/json" \
  -d '{
    "chatbotId": "your-chatbot-id",
    "sessionId": "test-session",
    "messages": [
      { "id": "m1", "role": "user",
        "parts": [{ "type": "text", "text": "Hello" }] }
    ]
  }'

Sessions are rate-limited per chatbot (default: 20 messages per 240 seconds, configurable in your chatbot's settings).

Managing Chatbots Programmatically

Use the MCP server: it exposes 13 tools covering chatbot creation and updates, knowledge sources, sessions and messages, analytics, insights, knowledge-gap detection, leads, tickets, and FAQs. It works from Claude, Cursor, and any MCP-compatible client — or from your own code via an MCP client library.

Webhooks

Subscribe to events from Dashboard → Settings → Webhooks. RocketFlow sends a POST request to your URL for each subscribed event:

EventFired when
session.createdA new chat session starts
session.resolvedA session is marked resolved
message.receivedA visitor sends a message
message.sentThe assistant sends a reply

Payload shape:

{
  "event": "message.received",
  "chatbotId": "your-chatbot-id",
  "timestamp": "2026-09-14T12:00:00.000Z",
  "data": { }
}

A signing secret (prefixed whsec_) is generated for each webhook when you create it — use it to verify request authenticity. See Webhooks for details.

SDKs

There are no published SDKs yet. The embed widget needs only the script tag, and the MCP server works with any MCP client.

Support

Last updated on