Skip to main content

Create Case

Creates a new case in your account. You can include vehicles, occupants, and accident information in a single request.

POST /api/cases

Request Body

{
"name": "string",
"plaintiff_name": "string",
"defendant_name": "string",
"attorney_name": "string",
"side": "plaintiff | defense",
"analysis_type": "accident_only | accident_injury | delta_v_only | biomechanics_only",
"organization_id": "string",

"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",
"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",
"injury_severity": "minor | moderate | serious | severe | critical",
"pre_existing_conditions": "string"
}
]
}

Parameters

Required Fields

  • plaintiff_name string, required Plaintiff name (injured party). Used for auto-generating case name if not provided.

  • defendant_name string, required Defendant name (at-fault party). Used for auto-generating case name if not provided.

  • attorney_name string, required Attorney name handling the case

Optional Fields

  • name string, optional Case name or title. If not provided, auto-generated as "PlaintiffLastName v. DefendantLastName" (e.g., "Smith v. Johnson")

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

  • analysis_type string, optional Type of analysis to run on this case. Defaults to accident_only.

    ValueDescriptionRequires Occupants?
    accident_onlyCrash analysis only (default)No
    accident_injuryCrash analysis + biomechanicsYes
    delta_v_onlyDelta-V calculation onlyNo
    biomechanics_onlyBiomechanics analysis onlyYes

    See Analysis Types Guide for detailed usage and examples.

  • organization_id string, optional Organization ID to associate the case with

Accident Information

  • accident object, optional Accident information

    • 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 involved in the accident

    • 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[].edr_file_id string - File ID of uploaded EDR data
    • vehicles[].image_file_ids array of strings - File IDs of uploaded damage photos

Occupants

  • occupants array of objects, optional List of vehicle occupants for biomechanics analysis

    • 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[].injury_severity string - One of: minor, moderate, serious, severe, critical
    • occupants[].pre_existing_conditions string - Description of pre-existing conditions

Response

{
"success": true,
"data": {
"case": {
"id": "case_abc123def456",
"name": "Smith v. Johnson",
"plaintiff_name": "John Smith",
"defendant_name": "Mike Johnson",
"attorney_name": "Jane Attorney",
"side": "plaintiff",
"analysis_type": "accident_only",
"has_edr": false,
"account_id": "acc_xyz789",
"organization_id": "org_abc123",
"status": "active",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"invoice": {
"id": "inv_xyz789",
"amount": 299.00,
"status": "pending"
}
}
}

Examples

Basic case creation (auto-generated name)

Create a case with just the required fields. The case name will be auto-generated as "Smith v. Johnson":

curl -X POST "https://api.silentwitness.ai/api/cases" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"plaintiff_name": "John Smith",
"defendant_name": "Mike Johnson",
"attorney_name": "Jane Attorney"
}'

Basic case creation (custom name)

Create a case with a custom name:

curl -X POST "https://api.silentwitness.ai/api/cases" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Smith v. Johnson - Car Accident 2024",
"plaintiff_name": "John Smith",
"defendant_name": "Mike Johnson",
"attorney_name": "Jane Attorney"
}'

Full case with all data

Create a case with vehicles, occupants, and accident information in a single request. The case name will be auto-generated as "Smith v. Johnson":

curl -X POST "https://api.silentwitness.ai/api/cases" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"plaintiff_name": "John Smith",
"defendant_name": "Mike Johnson",
"attorney_name": "Jane Attorney",
"organization_id": "org_abc123",

"accident": {
"description": "Rear-end collision at red light. Defendant struck plaintiff from behind while plaintiff was stopped.",
"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"
},
{
"role": "defendant",
"vehicle_maker": "Ford",
"vehicle_model": "F-150",
"vehicle_year": "2019",
"vehicle_type": "truck"
}
],

"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"],
"injury_severity": "moderate"
}
]
}'

Errors

CodeDescription
400Invalid request body - missing required fields
401Unauthorized - Invalid or missing API key
500Internal server error

After creating a case with all data:

1. POST /api/cases              → Create case with vehicles, occupants, accident info
2. POST /api/files/upload → Upload plaintiff damage photos
3. PUT /api/cases/:id → Link file IDs to plaintiff vehicle
4. POST /api/reports → Create report (auto-triggers delta-v calculation)
5. GET /api/reports/:id → Poll for completion

See Update Case for linking uploaded file IDs. See Create Report and Get Report for the Stripe-style reports API.