Developer API

Build with Flowly's API

A clean REST API with streaming support, an embeddable widget with a JavaScript API, and an SDK for Node.js. Integrate Flowly into anything you build.

streaming-chat.ts
// Install
npm install @flowly/sdk

// Initialize
import { FlowlyClient } from '@flowly/sdk';

const client = new FlowlyClient({
  apiKey: process.env.FLOWLY_API_KEY,
});

// Send a message (streaming)
const stream = await client.chat({
  chatbotId: 'your-bot-id',
  sessionId: 'user-session-123',
  message: 'What is your return policy?',
});

for await (const chunk of stream) {
  process.stdout.write(chunk.text);
}

REST

API style

SSE

Streaming protocol

CORS

Cross-origin ready

JWT

Auth method

Widget API

The embed that developers actually like

One script tag to embed. A full window.Flowly JavaScript API to control it programmatically. Listen for events, open and close it, pre-populate messages.

Flowly.open()Open the chat widget
Flowly.close()Close the chat widget
Flowly.sendMessage(text)Inject a pre-filled message
Flowly.isOpen()Returns boolean widget state
flowly:message eventFires on every new message
flowly:open / flowly:closeWidget open/close lifecycle
embed.html
<!-- Add to any HTML page -->
<script
  src="https://flowly.ai/embed.js"
  data-chatbot-id="your-bot-id"
  data-position="bottom-right"
  async>
</script>

<!-- Control programmatically -->
<script>
  // Open the chat widget
  window.Flowly.open();

  // Send a message
  window.Flowly.sendMessage('Hello!');

  // Listen for events
  window.addEventListener('flowly:message', (e) => {
    console.log('New message:', e.detail);
  });
</script>

REST API

Endpoint reference

GET
/api/embed/chatbots/:id

Fetch public chatbot config (name, color, position, system prompt)

POST
/api/embed/chat

Send a message and receive a streaming SSE response

GET
/api/chatbots/:id/messages

Retrieve full conversation history for a session (authenticated)

POST
/api/chatbots/:id/knowledge

Upload a file to the chatbot's knowledge base (authenticated)

GET
/api/dashboard

Aggregate stats across all bots (authenticated)

All public embed endpoints are CORS-enabled. Authenticated endpoints require a Bearer token.

Start building today

Create a free account and get your API key in seconds.

Get your API key