Sistava

Send a message

POST /api/v1/chat

Send a prompt to an employee and get their response. Same execution pipeline as web chat — same skills, tools, memory, and billing.

Body parameters

Name Type Required Description
employee_id uuid yes The employee to message. The UUID is in the employee profile URL.
prompt string yes Your message or instruction.

Response

Name Type Required Description
message_id uuid no Unique ID for this exchange.
employee_id uuid no The employee that responded.
content string no The employee’s response text.

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 — see Retry-After header
502 Employee unreachable (infrastructure error)
504 Employee timed out (5 minute limit)

Request - cURL

curl -X POST https://sistava.com/api/v1/chat \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "employee_id": "YOUR_EMPLOYEE_UUID",
    "prompt": "Draft a follow-up email for the client meeting."
  }'

Request - Python

import requests

r = requests.post(
    "https://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.",
    },
)
print(r.json()["content"])

Request - Node

const r = await fetch("https://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 r.json();
console.log(content);

Response 200

{
  "message_id": "a1b2c3d4-...",
  "employee_id": "YOUR_EMPLOYEE_UUID",
  "content": "Here is the follow-up email..."
}

Concepts and walkthrough: https://sistava.com/en/guide/channels/api

API reference index: https://sistava.com/en/docs