Sistava

Integrate via REST API

Your AI employees are accessible via a REST API. Any system that can make HTTP requests can send prompts and receive responses. No SDK needed, just curl or your favorite HTTP client.

TL;DR

Generate an API key in Settings, Communications. Send a POST to /api/v1/chat with the employee ID and your prompt. Get the response back as JSON. The API uses the same execution pipeline as web chat, so the employee has full access to its skills, tools, and memory.

When to Use This

How It Works

The API exposes a single endpoint for chatting with employees. Requests are synchronous: the API blocks until the employee responds (up to 5 minutes). Messages go through the same execution pipeline as web chat: same skills, same memory, same tools, same billing.

Authentication

All requests require a Bearer token in the Authorization header.

  1. Go to Settings, Communications
  2. Expand the Programmatic group
  3. Expand any channel card (API Access, MCP Server, etc.)
  4. Click "New Key", give it a name, hit Enter
  5. Copy the key from the green banner. It will not be shown again

Include it in every request:

Authorization: Bearer sk-your-api-key-here

Keys are shared across all programmatic channels. One key works for the REST API, MCP Server, A2A, Webhooks, and Email.

Enable the Channel

The API channel is disabled by default. Enable it before making requests:

  1. Go to Settings, Technical, Communications
  2. Find API under the Inbound channels
  3. Toggle it on

Without this, requests will return a 403 error.

Endpoints

POST /api/v1/chat

Send a prompt to an AI employee and receive their response.

Finding employee IDs. Employee UUIDs are visible in the browser URL when viewing an employee's profile (e.g., /employees/abc-123-...).

Request body:

Field Type Required Description
employee_id UUID string Yes The ID of the employee to chat with
prompt string Yes Your message or instruction

Response (200 OK):

Field Type Description
message_id UUID string Unique ID for this message exchange
employee_id UUID string The employee that responded
content string The employee's response text

GET /api/v1/health

Returns {"status": "ok"} if the service is running. Requires authentication.

Error Responses

Status Meaning
400 Bad request: missing fields, invalid UUID, or malformed JSON
401 Invalid or missing API key
403 Channel not enabled, or email not verified
413 Request body exceeds 64 KB
429 Rate limit exceeded
502 Employee unreachable (infrastructure error)
504 Employee timed out (5 minute limit)

Rate Limits

Exceeding limits returns 429 Too Many Requests with a Retry-After: 60 header.

Quick Start

curl

curl -X POST https://api-sistava.com/api/v1/chat \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "employee_id": "YOUR_EMPLOYEE_UUID",
    "prompt": "What can you help me with?"
  }'

Python

import requests

response = requests.post(
    "https://api-sistava.com/api/v1/chat",
    headers={"Authorization": "Bearer sk-your-api-key"},
    json={
        "employee_id": "YOUR_EMPLOYEE_UUID",
        "prompt": "Draft a follow-up email for the client meeting."
    },
)
data = response.json()
print(data["content"])

JavaScript / Node

const response = await fetch("https://api-sistava.com/api/v1/chat", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk-your-api-key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    employee_id: "YOUR_EMPLOYEE_UUID",
    prompt: "What tasks are pending this week?",
  }),
});
const { content } = await response.json();
console.log(content);

API vs MCP Server vs A2A

REST API MCP Server A2A
For Your code (backends, scripts, bots) AI tools (Claude Desktop, Cursor) Other AI agents
Protocol HTTP JSON MCP (JSON-RPC) A2A (JSON-RPC 2.0)
Best when You control the calling code Your AI tools need to talk to employees Agent-to-agent delegation

Good to Know

Frequently Asked Questions

Q: Do I need a separate API key for each channel? A: No. API keys are shared across all programmatic channels. One key works for the REST API, MCP Server, A2A, Webhooks, and Email.

Q: Can I send messages to a team instead of an individual employee? A: Send to a team leader's employee ID. The leader will delegate to team members as needed, the same way it works in web chat.

Q: What happens if the employee takes longer than 5 minutes? A: You get a 504 timeout. Break the task into smaller prompts, or use the Webhook channel for fire-and-forget tasks.

Q: Is there a streaming version of the API? A: Use the A2A channel with tasks/sendSubscribe for streaming responses via Server-Sent Events. The REST API is synchronous only.

Q: How do I find my employee's UUID? A: Open the employee's profile in the web app. The UUID is in the browser URL (e.g., /employees/abc-123-...).