The Cases API is the core REST interface for case CRUD, workflow operations, and timeline queries. All endpoints require a valid Bearer token and respect the acting user's access group restrictions.
Base URL: http://localhost:8200 (or your deployed domain). All endpoints require:
Authorization: Bearer <access_token> Content-Type: application/json
| Method | Path | Description |
|---|---|---|
GET | /api/v1/cases | List cases — paginated, filterable, sortable |
POST | /api/v1/cases | Create a new case |
GET | /api/v1/cases/{id} | Get full case detail including current stage, data, and SLA state |
PATCH | /api/v1/cases/{id} | Update case fields (partial update, JSONB merge) |
POST | /api/v1/cases/{id}/advance | Advance case to next stage via a named transition |
POST | /api/v1/cases/{id}/assign | Assign or reassign the case to a user or group |
POST | /api/v1/cases/{id}/close | Close the case (moves to terminal Resolved stage) |
POST | /api/v1/cases/{id}/cancel | Cancel the case with a reason note |
POST | /api/v1/cases/{id}/escalate | Escalate — bumps priority and notifies escalation target |
GET | /api/v1/cases/{id}/events | Case event timeline (chronological, append-only) |
POST | /api/v1/cases/{id}/notes | Add an internal note to the case timeline |
POST | /api/v1/cases/{id}/steps/{step_id}/complete | Mark a step as complete |
GET | /api/v1/case-types | List all published case type definitions |
GET | /api/v1/case-types/{id} | Get full case type definition (stages, steps, forms, SLAs) |
| Parameter | Type | Description | Example |
|---|---|---|---|
status | string | Filter by case status | open, in_progress, resolved, cancelled |
case_type_id | string | Filter by case type | support-request |
assignee_id | UUID | Filter by assigned user | |
access_group | string | Filter by access group (admin only) | group-finance |
sla_status | enum | Filter by SLA state | ok, warning, breached, none |
from / to | ISO 8601 | Filter by creation date range | 2026-05-01 |
q | string | Full-text search on title and data fields | q=passport |
page | int | Page number (1-based) | 1 |
per_page | int | Results per page (max 100) | 25 |
sort | string | Sort field | created_at, updated_at, sla_remaining |
order | enum | Sort direction | asc, desc |
# Create a new case curl -s -X POST http://localhost:8200/api/v1/cases \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "case_type_id": "support-request", "title": "Cannot login to portal", "data": { "category": "technical", "priority": "high", "description": "Getting 401 on every attempt" } }' # Advance to next stage via a named transition curl -s -X POST http://localhost:8200/api/v1/cases/CASE-0042/advance \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{"transition_id": "intake-to-review", "data": {"review_notes": "All docs received"}}' # List breaching-SLA cases, sorted by urgency curl -s "http://localhost:8200/api/v1/cases?sla_status=breached&sort=sla_remaining&order=asc" \ -H "Authorization: Bearer $TOKEN"
| HTTP Code | Meaning | Common Cause |
|---|---|---|
| 400 | Bad Request | Missing required fields, invalid field type |
| 401 | Unauthorized | Missing or expired Bearer token |
| 403 | Forbidden | User's access group doesn't include this case |
| 404 | Not Found | Case ID or case type ID doesn't exist |
| 409 | Conflict | Case already closed, transition already taken |
| 422 | Unprocessable | Transition not valid from current stage; guard condition failed |
| 451 | Unavailable For Legal Reasons | HxGlobal data residency policy violation |