Skip to main content
PATCH
Archive a file
Archives a file, permanently hiding it from all live API responses (case details, file listings, search, and analysis endpoints). The file data is retained for audit trail purposes.
Archiving is one-way; there is no restore endpoint. Confirm the action before calling this endpoint.
Archiving keeps the file’s data. To erase a file and everything produced from it, use Delete File.

Permission

Requires organisation_files:delete, which the Owner and Admin roles hold by default. A caller without it receives 403. To archive a file you did not upload, you also need organisation_files:read, or your organisation must have shared cases enabled; otherwise the API returns 404. See Permissions and API Keys.

Best Practices

  1. Wait for analysis to settle: A file can only be archived once its analysis has completed. Archiving a file mid-analysis returns 409 Conflict.
  2. Handle repeat calls: Archiving an already-archived file also returns 409 Conflict; treat it as already done rather than an error.

Authorizations

x-api-key
string
header
required

Path Parameters

fileId
string
required

File ID

caseId
string
required

Case ID

Response

File archived successfully

file_id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
case_id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
case_label
string | null
required
label
string | null
required
mime_type
string | null
required
thumbnail_url
string | null
required
current_risk_score
string | null
required
analysis_status
enum<string>
required
Available options:
waiting_for_upload,
processing,
triaged,
settled
analysis_outcome
enum<string> | null
required
Available options:
success,
failed,
triage_expired
current_analysis_phase
string | null
required
uploaded_at
string<date-time> | null
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
created_at
string<date-time>
required
Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
team_id
string<uuid>
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
team_name
string