Introduction

Getting Started

Build chatbots, manage flows, and connect channels with the Sarufi REST API.

Overview

The Sarufi Developer API lets you programmatically manage every aspect of your chatbot workspace — create and configure chatbots, design conversation flows, attach knowledge bases, manage integrations, and pull analytics.

The APIs are rate limited with about average of

  • Reads: 1 Request/seconds
  • Write/Update: 1 Request/ 2 Seconds

Just be reasonable with usage, we can assume you are just not hitting Enter out of panic...

All endpoints are organized under:

bash
https://beta-api.sarufi.io/api/dev/v1

Deprecation warning

The base URL is expect to be changed. The https://beta-api.sarufi.io will be move to other subdomain

The API follows REST conventions — resources are accessed via standard HTTP methods, request and response bodies are JSON, and errors return meaningful HTTP status codes.

Quick Start

Get your workspace info in 30 seconds:

bash
curl -X GET https://beta-api.sarufi.io/api/dev/v1/me \
  -H "Authorization: Bearer <your-api-key>"

A successful response returns your workspace and API key details:

json
{
  "workspace": {
    "id": "01JMXYZ...",
    "name": "My Workspace"
  },
  "api_key": {
    "key": "sk-...",
    "created_at": "2026-01-15T10:00:00Z"
  }
}

Base URL

All API requests use this base URL:

bash
https://beta-api.sarufi.io/api/dev/v1

Request Format

  • Content-Type: application/json for all requests with a body
  • Accept: application/json
  • All timestamps are ISO 8601 UTC strings

Response Format

Successful responses return JSON with the resource data. Paginated list endpoints return:

json
{
  "items": [...],
  "next_cursor": "opaque-string-or-null",
  "total": 42
}

Use cursor in subsequent requests to page through results.

Error Responses

StatusMeaning
400Bad request — validation error in request body
401Unauthorized — missing or invalid API key
403Forbidden — action not permitted for this workspace
404Not found — resource does not exist
409Conflict — resource already exists
422Unprocessable entity — schema validation failed
429Too Many Requests - The APIs have rate limited (just be reasonable)
500Internal server error

Error bodies include a detail field describing the problem:

json
{
  "detail": "Chatbot with this name already exists in workspace."
}

Rate Limits

The API applies rate limits per workspace. If you exceed the limit you receive 429 Too Many Requests. Wait before retrying — the Retry-After header indicates how many seconds to wait.

Get your API key

Go to your Sarufi workspace → SettingsAPI Keys to generate your developer API key.