Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sluice.sh/llms.txt

Use this file to discover all available pages before exploring further.

The Sluice API is served at https://sluice.sh/api. All endpoints return JSON and follow consistent error handling conventions.

Authentication

All endpoints (except /api/health) require authentication. See the Authentication page for details.
EndpointAuth method
POST /api/ingestAPI key via Authorization: Bearer sk_...
All other endpointsSession cookie (dashboard)

Rate limits

The free tier allows 10,000 ingested events per day. The POST /api/ingest endpoint enforces this limit and returns 429 with a Retry-After header when exceeded. Dashboard API endpoints (jobs, queues, workers) are not rate-limited in V0.

Error format

All error responses follow a consistent structure:
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request body failed schema validation.",
    "docs_url": "https://docs.sluice.sh/troubleshooting/api-errors",
    "details": {}
  }
}
FieldTypeDescription
error.codestringMachine-readable error code (e.g., VALIDATION_ERROR, NOT_FOUND, UNAUTHORIZED).
error.messagestringHuman-readable description of what went wrong.
error.docs_urlstringLink to the relevant troubleshooting page.
error.detailsobject?Additional context — field-level validation errors, for example.

HTTP status codes

CodeMeaning
200Success
201Resource created
400Bad request — invalid JSON, schema validation failure, or invalid parameters
401Unauthorized — missing or invalid API key / session
404Resource not found
409Conflict — resource already exists
429Rate limited or daily usage limit exceeded
500Internal server error

Pagination

The API uses two pagination styles: Cursor-based (for jobs): Returns a nextCursor token. Pass it as the cursor query parameter to get the next page. Best for real-time data where new records are constantly being added.
{
  "data": [...],
  "pagination": {
    "nextCursor": "eyJpZCI6Ij...",
    "limit": 50,
    "total": 1234
  }
}
Page-based (for queues, workers): Uses page and limit query parameters with a total count.
{
  "data": [...],
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 12,
    "totalPages": 1
  }
}

Endpoints

MethodPathDescription
POST/api/ingestIngest events from SDK or agent
GET/api/jobsList and search jobs
GET/api/jobs/:idGet job detail with state history
POST/api/jobs/:id/retryRetry a failed job
POST/api/jobs/:id/revokeRevoke/cancel a job
POST/api/jobs/bulk/retryRetry multiple jobs
POST/api/jobs/bulk/revokeRevoke multiple jobs
GET/api/queuesList queues with metrics
GET/api/workersList workers with status
GET/api/events/streamServer-Sent Events stream
GET/api/healthHealth check