Base URL & Authentication

Base URL: http://localhost:8200 (or your deployed domain). All endpoints require:

Authorization: Bearer <access_token>
Content-Type: application/json

Core Endpoints

MethodPathDescription
GET/api/v1/casesList cases — paginated, filterable, sortable
POST/api/v1/casesCreate 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}/advanceAdvance case to next stage via a named transition
POST/api/v1/cases/{id}/assignAssign or reassign the case to a user or group
POST/api/v1/cases/{id}/closeClose the case (moves to terminal Resolved stage)
POST/api/v1/cases/{id}/cancelCancel the case with a reason note
POST/api/v1/cases/{id}/escalateEscalate — bumps priority and notifies escalation target
GET/api/v1/cases/{id}/eventsCase event timeline (chronological, append-only)
POST/api/v1/cases/{id}/notesAdd an internal note to the case timeline
POST/api/v1/cases/{id}/steps/{step_id}/completeMark a step as complete
GET/api/v1/case-typesList all published case type definitions
GET/api/v1/case-types/{id}Get full case type definition (stages, steps, forms, SLAs)

List Cases — Query Parameters

ParameterTypeDescriptionExample
statusstringFilter by case statusopen, in_progress, resolved, cancelled
case_type_idstringFilter by case typesupport-request
assignee_idUUIDFilter by assigned user
access_groupstringFilter by access group (admin only)group-finance
sla_statusenumFilter by SLA stateok, warning, breached, none
from / toISO 8601Filter by creation date range2026-05-01
qstringFull-text search on title and data fieldsq=passport
pageintPage number (1-based)1
per_pageintResults per page (max 100)25
sortstringSort fieldcreated_at, updated_at, sla_remaining
orderenumSort directionasc, desc

Examples

# 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"

Error Reference

HTTP CodeMeaningCommon Cause
400Bad RequestMissing required fields, invalid field type
401UnauthorizedMissing or expired Bearer token
403ForbiddenUser's access group doesn't include this case
404Not FoundCase ID or case type ID doesn't exist
409ConflictCase already closed, transition already taken
422UnprocessableTransition not valid from current stage; guard condition failed
451Unavailable For Legal ReasonsHxGlobal data residency policy violation