Sazabi
API

Endpoints

Overview of Sazabi API endpoints and resources.

The Sazabi API provides programmatic access to your observability data, threads, and configuration.

Base URLs

Sazabi uses different base URLs for different purposes:

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

Request format

All requests should include the Content-Type header for request bodies:

Content-Type: application/json

Authenticate using the appropriate header for your key type:

# For public keys (intake)
x-sazabi-key: pk_live_your_public_key

# For secret keys (API)
x-sazabi-secret-key: sk_live_your_secret_key

Response format

All API responses follow a consistent envelope format.

Successful response

{
  "data": {
    "id": "thr_abc123",
    "title": "Investigating 500 errors",
    "createdAt": "2024-01-15T10:30:00Z"
  },
  "error": null
}

Error response

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

Common error codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid or missing API key
FORBIDDEN403Key does not have required scope
NOT_FOUND404Resource does not exist
VALIDATION_ERROR400Invalid request parameters
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error (retry with backoff)

Available resources

Threads

Threads are conversations with Chat about your production systems.

EndpointMethodAuthDescription
/threadsGETSecretList threads
/threadsPOSTSecretCreate a new thread
/threads/:idGETSecretGet thread details
/threads/:idPATCHSecretUpdate thread
/threads/:idDELETESecretArchive thread
/threads/:id/messagesGETSecretList messages in a thread
/threads/:id/messagesPOSTSecretSend a message

Projects

Projects organize your logs and configuration.

EndpointMethodAuthDescription
/projectsGETSecretList projects
/projects/:idGETSecretGet project details

Data sources

Data sources are connections to external log providers.

EndpointMethodAuthDescription
/data-sourcesGETSecretList data sources
/data-sources/:idGETSecretGet data source

Logs

Ingest logs into Sazabi.

EndpointMethodAuthDescription
/v1/logsPOSTPublicSend logs (JSON format)

Log ingestion uses the Intake base URL (https://intake.sazabi.com) and requires a public API key.

Pagination

List endpoints support cursor-based pagination using the limit and cursor parameters.

Request

curl "https://api.sazabi.com/threads?limit=20&cursor=eyJpZCI6InRocl9hYmMxMjMifQ" \
  -H "x-sazabi-secret-key: sk_live_your_secret_key"

Parameters

ParameterTypeDefaultDescription
limitnumber20Number of items to return (max 100)
cursorstring-Cursor from previous response

Response

Paginated responses include a nextCursor field when more items are available:

{
  "data": {
    "items": [
      { "id": "thr_abc123", "title": "Thread 1" },
      { "id": "thr_def456", "title": "Thread 2" }
    ],
    "nextCursor": "eyJpZCI6InRocl9kZWY0NTYifQ"
  },
  "error": null
}

Pass nextCursor as the cursor parameter to fetch the next page. When nextCursor is null, you have reached the end of the list.

API reference

For complete endpoint documentation including request/response schemas, see the full API reference.

Next steps