API reference
Events
Job and workflow run completion events: gap-free cursor feed with optional long-poll. Thin events; re-read status.
List job / workflow run completion events
GET/api/v1/events
API key or token
The caller's stop transitions, oldest first, retained 7 days.
Delivery is at-least-once and gap-free: dedupe on event_id. Events are thin; re-read /jobs/status or /workflows/runs/{run_id} for detail.
Parameters
| Name | Type | Description |
|---|---|---|
after | string | Cursor from a previous response; omit for the oldest retained. Limits: |
kind | string | One of: |
subject_id | string | Limits: |
limit | integer | Default: |
wait | number | Seconds to hold the request open when there are no events. Default: |
Example request
curl "https://api.cognichem.com/api/v1/events" \
-H "X-Api-Key: $COGNICHEM_API_KEY"from cognichem_client import CogniChem
client = CogniChem.from_env()
result = client.events.list()
print(result)Python SDK pip install cognichem-client (1.1 or later). from_env() reads COGNICHEM_API_KEY.
Responses
Successful Response · application/json · RunEventsResponse
| Field | Type | Description |
|---|---|---|
events[]required | RunEvent[] | |
events.cursorrequired | string | Opaque cursor positioned at this event. |
events.event_idrequired | integer | Dedupe key (at-least-once delivery). |
events.kindrequired | string | One of: |
events.occurred_atrequired | string (date-time) | |
events.statusrequired | string | Jobs: completed | error | cancelled. Workflow runs: completed | failed | cancelled | paused. |
events.subject_idrequired | string | Job id or workflow run id. |
events.workflow_run_id | string | null | Owning run when the job is a workflow step. |
next_cursor | string | null | Pass as |
{
"events": [
{
"cursor": "1121.42",
"event_id": 42,
"kind": "job",
"occurred_at": "2026-09-27T12:00:00Z",
"status": "completed",
"subject_id": "job-01J..."
}
],
"next_cursor": "1121.42"
}Errors are RFC 7807 problem details (application/problem+json) with status, title, detail, request_id, and a retryability hint (validation, auth, quota, conflict, upstream, timeout, or terminal). Handling errors
| Status | When |
|---|---|
400 | Invalid input or business rule violation. |
401 | Missing or invalid credentials. |
402 | Wallet cannot cover the Assistant turn hold. |
403 | Authenticated but not allowed to access the resource. |
404 | Resource not found or not owned by the user. |
409 | Conflict (e.g. idempotency key reuse with a different body). |
413 | Request body or workflow spec exceeds size caps. |
422 | Request body or query failed validation. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
503 | Dependency temporarily unavailable. |