Skip to main content

Files API

Files represent uploaded evidence such as vehicle damage photos and EDR (Event Data Recorder) files. Files are associated with cases and used for crash analysis.

Endpoints

MethodEndpointDescription
POST/api/files/uploadUpload file
GET/api/filesList files
GET/api/files/:fileIdGet file
DELETE/api/files/:fileIdDelete file

File Object

{
"fileId": "file_abc123def456",
"fileName": "front_damage.jpg",
"status": "ready",
"downloadUrl": "https://api.silentwitness.ai/api/files/file_abc123/download",
"url": "https://storage.silentwitness.ai/..."
}

Supported File Types

The API accepts exactly five file types. The server detects the type from the file's bytes — the Content-Type header your client sends is not trusted.

TypeMIME typeTypical use
JPEGimage/jpegVehicle damage photos
PNGimage/pngVehicle damage photos
GIFimage/gifVehicle damage photos
WebPimage/webpVehicle damage photos
PDFapplication/pdfEDR / crash reports, medical records, other documents

Vehicle Damage Photos

  • Formats: JPEG, PNG, GIF, WebP
  • Max size: 50MB per file
  • Quantity: 1-20 photos per vehicle (4-8 recommended)

EDR (Event Data Recorder) Files

  • Formats: PDF
  • Max size: 50MB per file
  • Quantity: 1 file per vehicle

Uploads outside these types are rejected at the upload endpoint with 400 Bad Request. HEIC, HEIF, DOC, DOCX, CSV, ZIP, and CDR files are not supported — convert them to a supported format before uploading.

File Categories

When uploading files, specify the category:

CategoryDescription
vehicle_photoVehicle damage photos
edr_documentEvent Data Recorder report (PDF)
tcr_documentTraffic Collision Report (PDF)

Use the vehicle_role field (plaintiff or defendant) to specify which vehicle the file belongs to. Defaults to plaintiff.

File Status

StatusDescription
processingFile is being uploaded
readyFile is ready for use
errorUpload failed

Workflow

  1. Create a case first
  2. Upload files with case ID
  3. Files are automatically linked to the case
  4. Use files in crash analysis and report generation

Next Steps