Sazabi
API

REST API

Programmatic access to Sazabi via HTTP endpoints.

The Sazabi REST API provides full programmatic access to your observability data, threads, and configuration. Use it to build custom integrations, automate workflows, and extend Sazabi's capabilities.

Overview

The API uses standard HTTP conventions:

  • JSON for request and response bodies
  • API keys for authentication
  • Cursor-based pagination for list endpoints
  • Consistent error responses across all endpoints

Base URLs

ServiceURLPurpose
APIhttps://api.sazabi.comCore API (threads, config)
Intakehttps://intake.sazabi.comLog ingestion
OTLP Intakehttps://otlp.intake.sazabi.comOpenTelemetry ingestion

Quick example

# List your threads
curl https://api.sazabi.com/threads \
  -H "x-sazabi-secret-key: sk_live_your_secret_key"

# Send a message to the AI assistant
curl -X POST https://api.sazabi.com/threads/thr_abc123/messages \
  -H "x-sazabi-secret-key: sk_live_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{"content": "What errors happened in the last hour?"}'

# Send logs
curl -X POST https://intake.sazabi.com/v1/logs \
  -H "x-sazabi-key: pk_live_your_public_key" \
  -H "Content-Type: application/json" \
  -d '{"message": "User signed in", "level": "info"}'

Documentation

Response format

All API responses follow a consistent envelope format:

{
  "data": { ... },
  "error": null
}

Error responses include a code and message:

{
  "data": null,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid API key"
  }
}

Rate limits

The API enforces rate limits to ensure fair usage:

  • Default limit: 1000 requests per minute
  • Burst allowance: Short bursts above the limit are permitted

Rate limit headers are included in every response:

HeaderDescription
X-RateLimit-LimitMaximum requests allowed per window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the window resets

Next steps