Skip to main content
POST
Restore a trashed document

Authorizations

Authorization
string
header
required

Personal Access Token. Send as Authorization: Bearer hq_pat_....

Path Parameters

id
string<uuid>
required

Document id

Response

Restored document

auto_categorized
boolean
required

True once the classifier worker has written back the auto-derived category/summary/tags. Distinct from category IS NOT NULL because users can set categories manually too.

classification_status
string
required

pending / queued / processing / completed / failed / skipped. UI shows a pill until this hits completed.

content_type
string
required
created_at
string<date-time>
required
download_url
string
required
filename
string
required
id
string<uuid>
required
is_owner
boolean
required

True iff the caller is the document's owner. Drives "Delete / Edit" affordances in the UI.

owner_user_id
string<uuid>
required
profile_version
string
required

Schema version - hq-document-classify-v1 for legacy rows, hq-document-classify-v2 once the classifier writes back the entities + dates surface.

reference_numbers
string[]
required

Document-specific IDs (invoice/case/order numbers). Free-form.

scope
string
required
sha256
string
required
size_bytes
integer<int64>
required
tags
string[]
required
updated_at
string<date-time>
required
analysis_strategy
string | null

Which classifier pipeline produced this row (TextOnly / VisionDirect / Hybrid / Image / PassThroughText). NULL on rows from before the smart-strategy slice.

caption
string | null
category
string | null
channel_id
string<uuid> | null
channel_name
string | null
classification_confidence
number<float> | null

Self-reported model certainty (0..1) about the classification. UI flags rows below 0.6 as "needs review".

document_date
string<date-time> | null

What the doc refers to (issue / publication / statement date), not when we ingested it. NULL when not determinable.

entities
any

LLM-extracted entities ({person_names, company_names, identifiers, amounts, dates}). JSONB blob; UI renders selectively.

folder_id
string<uuid> | null

Folder this document lives in. NULL = the root of its scope.

language
string | null

ISO 639-1 code (en, sv, ...). NULL when not determinable.

owner_display
string | null
source_ref
string | null
source_url
string | null
summary
string | null