Optimaite

Cases

3 min readUpdated May 26, 2026Auch auf Deutsch verfuegbar

The Cases API is the central resource for legal matter management. Every case can have assigned parties, staff, documents, deadlines, and notes.

Endpoints

MethodPathDescription
GET/api/v1/casesList cases
POST/api/v1/casesCreate a case
GET/api/v1/cases/{id}Get a case
PUT/api/v1/cases/{id}Update a case
DELETE/api/v1/cases/{id}Delete a case
GET/api/v1/cases/{id}/partiesList case parties
POST/api/v1/cases/{id}/partiesAdd parties to a case
PUT/api/v1/cases/{id}/partiesReplace case parties
GET/api/v1/cases/{id}/staffList assigned staff
POST/api/v1/cases/{id}/staffAdd staff to a case
DELETE/api/v1/cases/{id}/staffRemove staff from a case
GET/api/v1/cases/{id}/timelineGet case timeline events
POST/api/v1/cases/{id}/linksLink two cases
GET/api/v1/cases/{id}/linksList case links
DELETE/api/v1/cases/{id}/links/{link_id}Remove a case link

Required scope: cases:read for GET endpoints, cases:write for POST/PUT/DELETE, cases:delete for DELETE.

The Case Object

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Smith v. Jones -- Employment Dispute",
  "file_number": "AZ-2026-042",
  "status": "active",
  "type": "litigation",
  "description": "Wrongful termination claim filed by former employee.",
  "dezernat": "Employment Law",
  "created_at": "2026-01-15T09:00:00Z",
  "updated_at": "2026-05-20T14:30:00Z",
  "parties": [
    {
      "id": "usr_01ABCDEF",
      "role": "client",
      "name": "John Smith"
    }
  ],
  "staff": [
    {
      "id": "usr_01GHIJKL",
      "name": "Dr. Anna Mueller",
      "role": "lead_attorney"
    }
  ]
}

List Cases

GET /api/v1/cases

Query Parameters

ParameterTypeDescription
cursorstringPagination cursor from previous response
limitintegerNumber of results (1-100, default 50)
statusstringFilter by status: active, closed, archived
searchstringSearch by case name or file number

Response

{
  "data": [
    { "id": "...", "name": "...", "file_number": "...", "status": "..." }
  ],
  "pagination": {
    "cursor": "eyJpZCI6IjU1MGU4NDAwIn0=",
    "has_more": true
  }
}

Create a Case

POST /api/v1/cases

Request Body

{
  "name": "Smith v. Jones",
  "file_number": "AZ-2026-042",
  "type": "litigation",
  "description": "Wrongful termination claim",
  "dezernat": "Employment Law"
}

Response

Returns 201 Created with the full case object.

Update a Case

PUT /api/v1/cases/{id}

Request Body

{
  "status": "closed",
  "description": "Case settled out of court."
}

Only included fields are updated (partial update semantics).

Error Responses

StatusCodeMeaning
400VALIDATION_ERRORInvalid request body
401AUTH_INVALID_KEYMissing or invalid API key
403AUTH_INSUFFICIENT_SCOPEMissing cases:read or cases:write scope
404CASE_NOT_FOUNDCase ID does not exist

Next Steps

  • Parties -- Manage contacts linked to cases
  • Documents -- Upload and manage case documents
  • Deadlines -- Manage legal deadlines
Was this helpful?