ChatFlow
📖 REST API v1.0

API Documentation

Automate your chat workflows, sync leads to your CRM, and build custom integrations using the SaaS Chat Platform REST API.

Authentication

All API requests require a Bearer API key in the Authorization header. Generate API keys from your dashboard under Settings → API Keys.

Authorization: Bearer sk_your_api_key

API keys are prefixed with sk_ and can be scoped to specific permissions (read, write, leads:read, conversations:read, messages:write).

Base URL

https://api.saaschat.io/v1/public

All endpoints are prefixed with /v1/public/. Responses are JSON. Errors follow { message, statusCode } shape.

Endpoints

Conversations

GET
/conversations

List conversations. Filter by status (open/resolved) or channel. Paginated.

🔑 API key
GET
/conversations/:id

Get a single conversation by ID with full metadata.

🔑 API key
GET
/conversations/:id/messages

Get paginated message history for a conversation.

🔑 API key
POST
/conversations/:id/messages

Send a message to a conversation as bot or agent.

🔑 API key

Leads

GET
/leads

List leads. Filter by status (new/contacted/qualified/closed). Paginated.

🔑 API key
PUT
/leads/:id

Update lead status.

🔑 API key

Analytics

GET
/analytics/summary

30-day analytics summary: SLA metrics (avg reply time, resolution time) + daily volume.

🔑 API key

Webhooks

GET
/webhook-events

List all available webhook event types.

POST
/webhooks

Register a new webhook endpoint to receive event notifications.

🔑 API key

Meta

GET
/

API info: version, rate limits, code examples, docs URL.

Code Examples

Quick-start examples in your language of choice.

// List conversations
const res = await fetch('https://api.saaschat.io/v1/public/conversations', {
  headers: { 'Authorization': 'Bearer sk_your_api_key' },
});
const { items, meta } = await res.json();

// Send a message
await fetch('https://api.saaschat.io/v1/public/conversations/conv_id/messages', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_your_api_key',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ content: 'Hello!', senderType: 'bot' }),
});

Rate Limits

Rate limits apply per API key. Exceeding limits returns 429 Too Many Requests.

PlanRequests / minRequests / day
Starter301,000
Pro12010,000
Elite600100,000

Changelog

v1.0.0

2026-05-01

Initial public API release — conversations, leads, analytics, webhooks