const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.factify.com/v1/documents/{document_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"org_id": "org_01h2xcejqtf2nbrexx3vqjhp41",
"title": "Q4 Financial Report",
"is_demo": false,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:35:00Z",
"created_by": {
"id": "usr_01h2xcejqtf2nbrexx3vqjhp41",
"name": "Alice Chen"
},
"url": "https://app.factify.com/documents/doc_01h2xcejqtf2nbrexx3vqjhp41",
"description": "<string>",
"current_version": {
"id": "ver_01h2xcejqtf2nbrexx3vqjhp41",
"created_at": "2025-01-15T10:30:00Z"
},
"trashed_at": "2023-11-07T05:31:56Z",
"last_viewed_at": "2023-11-07T05:31:56Z",
"shared_at": "2023-11-07T05:31:56Z",
"thumbnail_url": "<string>",
"capabilities": {
"attach_policy": true,
"comment_private": true,
"comment_public": true,
"copy_content": true,
"create_version": true,
"export": true,
"grant_access": true,
"list_versions": true,
"manage_access": true,
"open": true,
"screenshot": true,
"trash": true,
"view": true,
"view_analytics": true,
"view_leads": true,
"view_timeline": true
},
"current_version_full": {
"id": "ver_01h2xcejqtf2nbrexx3vqjhp41",
"document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"created_at": "2025-01-15T10:30:00Z",
"created_by": {
"id": "usr_01h2xcejqtf2nbrexx3vqjhp41",
"name": "Alice Chen"
},
"status_error": "unsupported file format"
}
}Get a document
Retrieves a document by ID, including its current processing status, access level, and the caller’s capabilities (per-action permission booleans).
Optional expansions via ?include=:
current_version— addscurrent_version_full, the full version payload with the embeddedcreated_bySubject. The lightweightcurrent_versionreference remains populated regardless.
Pass the parameter multiple times to request more than one expansion. Values outside the listed enum are rejected with 400 during request validation.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.factify.com/v1/documents/{document_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"org_id": "org_01h2xcejqtf2nbrexx3vqjhp41",
"title": "Q4 Financial Report",
"is_demo": false,
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:35:00Z",
"created_by": {
"id": "usr_01h2xcejqtf2nbrexx3vqjhp41",
"name": "Alice Chen"
},
"url": "https://app.factify.com/documents/doc_01h2xcejqtf2nbrexx3vqjhp41",
"description": "<string>",
"current_version": {
"id": "ver_01h2xcejqtf2nbrexx3vqjhp41",
"created_at": "2025-01-15T10:30:00Z"
},
"trashed_at": "2023-11-07T05:31:56Z",
"last_viewed_at": "2023-11-07T05:31:56Z",
"shared_at": "2023-11-07T05:31:56Z",
"thumbnail_url": "<string>",
"capabilities": {
"attach_policy": true,
"comment_private": true,
"comment_public": true,
"copy_content": true,
"create_version": true,
"export": true,
"grant_access": true,
"list_versions": true,
"manage_access": true,
"open": true,
"screenshot": true,
"trash": true,
"view": true,
"view_analytics": true,
"view_leads": true,
"view_timeline": true
},
"current_version_full": {
"id": "ver_01h2xcejqtf2nbrexx3vqjhp41",
"document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"created_at": "2025-01-15T10:30:00Z",
"created_by": {
"id": "usr_01h2xcejqtf2nbrexx3vqjhp41",
"name": "Alice Chen"
},
"status_error": "unsupported file format"
}
}Documentation Index
Fetch the complete documentation index at: https://developers.factify.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Bearer authentication using a factapi-issued API key
(ffy_<env>_<base32_uuid><base62_random>). Cookie-based
sessions are accepted automatically by user-facing endpoints
but are not surfaced as an OpenAPI auth scheme.
Path Parameters
Document ID
"doc_01h2xcejqtf2nbrexx3vqjhp41"
Query Parameters
Optional expansions. Repeat the parameter to request more than one. Values outside the listed enum are rejected with 400 during request validation.
current_version ["current_version"]
Response
OK
A document with metadata, processing state, access policy, and the
caller's per-action capabilities. Embeds a current_version reference
to the most recent version for status checks; full version history is
available via listVersions.
Unique document ID. Pattern doc_[0-9a-hjkmnp-tv-z]{26}.
"doc_01h2xcejqtf2nbrexx3vqjhp41"
ID of the organization that owns the document.
"org_01h2xcejqtf2nbrexx3vqjhp41"
Human-readable document title. Defaults to the uploaded filename if not specified at create time.
"Q4 Financial Report"
True for the seed demo document minted by the new-user provisioning flow. Workspace OnboardingTour gates on this.
false
Lifecycle state of a document version's ingestion pipeline.
pending, processing, ready, failed Origin file format of an uploaded document version.
pdf, docx, xlsx, csv, markdown Document access level. Aligned with v1beta SDK enum exactly.
private, organization, public Timestamp when the document was first created.
"2025-01-15T10:30:00Z"
Timestamp of the last metadata or version change.
"2025-01-15T10:35:00Z"
Subject is a lightweight reference to either a user or a bot. Used in
embedded fields like created_by. For full details, call GetUser or
GetBot with the subject's id.
Show child attributes
Show child attributes
Deeplink URL for accessing the document in the Factify web app.
"https://app.factify.com/documents/doc_01h2xcejqtf2nbrexx3vqjhp41"
Optional document description.
10000Lightweight reference to a document version.
Show child attributes
Show child attributes
Timestamp when the document was moved to trash. Absent for non-trashed documents.
Timestamp when the authenticated user last viewed this document. Absent if the user has never viewed it.
Timestamp when this document was last shared to the authenticated user. Absent if the document was never shared to them.
URL of the document thumbnail image. May be absent before the first ingestion completes.
Permissions the authenticated user has on a document. Each field is optional; absent means the capability is not known or not evaluated.
Show child attributes
Show child attributes
Expanded current-version payload. Populated only when GetDocument
is called with ?include=current_version; absent on List responses
and on Get without the include. The lightweight current_version
reference remains populated regardless. Carries the version's
creator as an embedded Subject (created_by).
Show child attributes
Show child attributes