---
title: "Process a document"
method: POST
path: "/v1beta/documents/{document_id}/process"
tags: ["Documents"]
---

# Process a document

`POST /v1beta/documents/{document_id}/process`

Triggers the AI processing pipeline (extraction and summarization) for the document's current or specified version.

## Path parameters

- `document_id` string, required — Document ID.

## Request body

- object — ProcessDocumentRequest triggers processing for a document version.
  - `async` boolean — If true, returns immediately without waiting for processing to complete.
  - `version_id` string, nullable — Optional version ID. If omitted, processes the current version.

## Response `200`

Success

- ProcessDocumentResponse — ProcessDocumentResponse contains the processing result.
  - `document_id` string — Document ID being processed.
  - `status` 'PROCESSING_OUTCOME_UNSPECIFIED' | 'PROCESSING_OUTCOME_STARTED' | 'PROCESSING_OUTCOME_ALREADY_PROCESSING' | 'PROCESSING_OUTCOME_ALREADY_COMPLETED' | 'PROCESSING_OUTCOME_FAILED' — ProcessingOutcome describes the result of a processing trigger request.
  - `version_id` string — Version ID being processed.

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication failed - missing or invalid API key
- `403` — Authorization failed - valid key but insufficient permissions
- `404` — Resource not found
- `429` — Too many requests
- `500` — Internal server error

---

[API](https://skmtc.net/factify-inc/apis/factify-api.md) · [All operations](https://skmtc.net/factify-inc/apis/factify-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/factify-inc/factify-api/revisions/8baabdfb82bf/schema)
