Skip to main content

Update Case

Updates an existing case. All fields are optional - only include the fields you want to update.

PUT /api/cases/:id

Path Parameters

ParameterTypeRequiredDescription
idstringYesCase ID

Request Body

{
"name": "string",
"plaintiff_name": "string",
"defendant_name": "string",
"attorney_name": "string",
"side": "plaintiff | defense",
"status": "active | archived",

"accident": {
"description": "string",
"date": "YYYY-MM-DD",
"time": "HH:MM",
"location": "string"
},

"vehicles": [
{
"role": "plaintiff | defendant",
"vehicle_maker": "string",
"vehicle_model": "string",
"vehicle_year": "string",
"vehicle_vin": "string",
"vehicle_type": "string",
"airbag_deployed": "yes | no | partial | unknown",
"deployed_airbags": ["string"],
"edr_file_id": "string",
"image_file_ids": ["string"]
}
],

"occupants": [
{
"name": "string",
"age": 0,
"gender": "male | female | other",
"height_inches": 0,
"weight_lbs": 0,
"position": "driver | front_passenger | rear_left | rear_center | rear_right",
"alleged_injuries": ["string"],
"seatbelt_worn": true,
"airbag_deployed": "yes | no | partial | unknown",
"pre_existing_conditions": "string"
}
]
}

Parameters

Basic Fields

  • name string, optional Case name or title (e.g., "Smith v. Johnson")

  • plaintiff_name string, optional Plaintiff name (injured party)

  • defendant_name string, optional Defendant name (opposing party)

  • attorney_name string, optional Attorney name handling the case

  • side string, optional Which party the attorney represents. One of: plaintiff or defense.

  • status string, optional Case status. One of: active, archived

Accident Information

  • accident object, optional Accident information. Only include fields you want to update.

    • accident.description string - Narrative description of the accident
    • accident.date string - Date of accident in YYYY-MM-DD format
    • accident.time string - Time of accident in HH:MM format
    • accident.location string - Location where the accident occurred

Vehicles

  • vehicles array of objects, optional List of vehicles to update. Only include the vehicles and fields you want to update.

    • vehicles[].role string, required - Vehicle role: plaintiff or defendant
    • vehicles[].vehicle_maker string - Manufacturer (e.g., "Toyota")
    • vehicles[].vehicle_model string - Model (e.g., "Camry")
    • vehicles[].vehicle_year string - Year (e.g., "2020")
    • vehicles[].vehicle_vin string - Vehicle Identification Number
    • vehicles[].vehicle_type string - Type: sedan, suv, truck, motorcycle, etc.
    • vehicles[].airbag_deployed string - Vehicle-level summary status: yes, no, partial, or unknown. Omit to leave the stored status unchanged.
    • vehicles[].deployed_airbags array of strings - Optional detail codes for the specific airbags that deployed. Omit this field to leave existing details unchanged. Send an empty array to clear details. If this field is provided with one or more values and airbag_deployed is omitted, the API preserves an existing partial status and otherwise stores airbag_deployed as yes when the current status is missing, no, or unknown. If airbag_deployed is explicitly no or unknown, details are stored as an empty array. See Vehicle Airbag Deployment for allowed values.
    • vehicles[].edr_file_id string - File ID of uploaded EDR data
    • vehicles[].image_file_ids array of strings - File IDs of uploaded damage photos (used for delta-v calculation)

Occupants

  • occupants array of objects, optional List of occupants. Note: This replaces all existing occupants when provided.

    • occupants[].name string - Occupant name
    • occupants[].age integer, required - Age in years
    • occupants[].gender string, required - One of: male, female, other
    • occupants[].height_inches integer - Height in inches
    • occupants[].weight_lbs integer - Weight in pounds
    • occupants[].position string, required - Seating position: driver, front_passenger, rear_left, rear_center, rear_right
    • occupants[].alleged_injuries array of strings - Injury types: head_brain, cervical_spine, thoracic_spine, lumbar_spine, shoulder, hip, knee, foot_ankle
    • occupants[].seatbelt_worn boolean - Whether seatbelt was worn
    • occupants[].airbag_deployed string - One of: yes, no, partial, unknown
    • occupants[].pre_existing_conditions string - Description of pre-existing conditions

Response

{
"success": true,
"data": {
"id": "case_abc123def456",
"name": "Smith v. Johnson",
"plaintiff_name": "John Smith",
"defendant_name": "Bob Johnson",
"attorney_name": "Jane Doe, Esq.",
"side": "plaintiff",
"has_edr": false,
"account_id": "acc_xyz789",
"organization_id": "org_abc123",
"status": "active",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z"
}
}

Examples

Update case name

curl -X PUT "https://api.silentwitness.ai/api/cases/case_abc123" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Smith v. Johnson (Amended)"
}'

After uploading photos via /api/files/upload, link them to enable automatic delta-v calculation:

curl -X PUT "https://api.silentwitness.ai/api/cases/case_abc123" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"vehicles": [
{
"role": "plaintiff",
"image_file_ids": [
"file_front_damage_001",
"file_rear_damage_002",
"file_side_damage_003"
]
}
]
}'

Update accident information and vehicles

curl -X PUT "https://api.silentwitness.ai/api/cases/case_abc123" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accident": {
"description": "Rear-end collision at red light. Defendant struck plaintiff from behind.",
"date": "2024-01-10",
"time": "14:30",
"location": "123 Main St, Los Angeles, CA"
},
"vehicles": [
{
"role": "plaintiff",
"vehicle_maker": "Toyota",
"vehicle_model": "Camry",
"vehicle_year": "2020",
"vehicle_vin": "4T1B11HK5LU123456",
"vehicle_type": "sedan",
"airbag_deployed": "yes",
"deployed_airbags": ["driver_frontal"]
},
{
"role": "defendant",
"vehicle_maker": "Ford",
"vehicle_model": "F-150",
"vehicle_year": "2019",
"vehicle_type": "truck",
"airbag_deployed": "no"
}
]
}'

Update occupants

curl -X PUT "https://api.silentwitness.ai/api/cases/case_abc123" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"occupants": [
{
"name": "John Smith",
"age": 45,
"gender": "male",
"height_inches": 70,
"weight_lbs": 180,
"position": "driver",
"seatbelt_worn": true,
"airbag_deployed": "yes",
"alleged_injuries": ["cervical_spine", "lumbar_spine"]
},
{
"name": "Jane Smith",
"age": 42,
"gender": "female",
"height_inches": 65,
"weight_lbs": 140,
"position": "front_passenger",
"seatbelt_worn": true,
"airbag_deployed": "yes",
"alleged_injuries": ["shoulder"]
}
]
}'

Archive a case

curl -X PUT "https://api.silentwitness.ai/api/cases/case_abc123" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "archived"
}'

Errors

CodeDescription
400Invalid request body
401Unauthorized - Invalid or missing API key
403Forbidden - Access denied to this case
404Case not found
500Internal server error

Error Examples

Case not found:

{
"success": false,
"error": "Case not found",
"error_code": "not_found",
"error_type": "invalid_request_error",
"request_id": "req_..."
}

Access denied:

{
"success": false,
"error": "Access denied",
"error_code": "forbidden",
"error_type": "permission_error",
"request_id": "req_..."
}