You need a Causeloop workspace and a WorkOS access token from your frontend’s AuthKit session. If you’re testing locally, run the backend with
AUTH_PROVIDER=none (and ENVIRONMENT not set to production) — POST /v1/auth/exchange then accepts any non-empty subject_token and returns a valid scoped JWT backed by seed data. You can also skip the exchange entirely for local scripting and mint a token directly with python -m scripts.mint_dev_token <workspace_id> <user_id> — see Local development.1
Exchange your WorkOS access token for a Causeloop token
Call You’ll receive a response like:Save the
POST /v1/auth/exchange with your WorkOS access token.access_token. It’s valid for 72 hours. Set it as an environment variable for the next steps:2
Ingest an issue
POST /v1/ingest/events accepts a single raw signal. Two fields matter most: narrative (the finding, renamed from the old body field) and occurred_at (when the failure actually happened — this is what the hazard model’s point process is built on). This path requires an Idempotency-Key header on every call — see Idempotency.202 Acceptedengine_status_summary tells you what happened without a second call: eligible means the issue has a narrative and will enter clustering on the next engine run; blocked_no_narrative means an engine-eligible issue arrived with no narrative — it’s accepted (never rejected) but parked with a review-queue item until someone supplies one, since narrative-less issues never enter clustering. Batch ingest (POST /v1/ingest/batch) returns the same shape with per-record rejected: [{index, errors[]}] — one bad record never fails the rest of the batch.3
List your issues
GET /v1/issues returns a cursor-paginated list of issues in your workspace, newest first.cursor=<next_cursor> on the next request. See Pagination & Filtering for full details.4
Fetch a pattern
Patterns are clusters of related issues. Use the Example response
pattern_id from an issue (or list all patterns) to get details.5
Next steps
Pagination & Filtering
Page through large result sets and apply filters and sorting.
Real-time events
Subscribe to live issue and pattern updates via WebSocket.
Rate limits
Understand limits and implement retry logic.
Error handling
Handle errors consistently across all endpoints.