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:
| Service | URL | Purpose |
|---|---|---|
| API | https://api.sazabi.com | Core API (threads, config) |
| Intake | https://intake.sazabi.com | Log ingestion |
| OTLP Intake | https://otlp.intake.sazabi.com | OpenTelemetry ingestion |
Request format
All requests should include the Content-Type header for request bodies:
Content-Type: application/jsonAuthenticate 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_keyResponse 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
| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED | 401 | Invalid or missing API key |
FORBIDDEN | 403 | Key does not have required scope |
NOT_FOUND | 404 | Resource does not exist |
VALIDATION_ERROR | 400 | Invalid request parameters |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Server error (retry with backoff) |
Available resources
Threads
Threads are conversations with Chat about your production systems.
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/threads | GET | Secret | List threads |
/threads | POST | Secret | Create a new thread |
/threads/:id | GET | Secret | Get thread details |
/threads/:id | PATCH | Secret | Update thread |
/threads/:id | DELETE | Secret | Archive thread |
/threads/:id/messages | GET | Secret | List messages in a thread |
/threads/:id/messages | POST | Secret | Send a message |
Projects
Projects organize your logs and configuration.
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/projects | GET | Secret | List projects |
/projects/:id | GET | Secret | Get project details |
Data sources
Data sources are connections to external log providers.
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/data-sources | GET | Secret | List data sources |
/data-sources/:id | GET | Secret | Get data source |
Logs
Ingest logs into Sazabi.
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/v1/logs | POST | Public | Send 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
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | number | 20 | Number of items to return (max 100) |
cursor | string | - | 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.