---
title: "Create a new version"
method: POST
path: "/v1beta/documents/{document_id}/versions"
tags: ["Versions"]
---

# Create a new version

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

Creates a new version by uploading a PDF file.

## Path parameters

- `document_id` string, required — Document ID to create version for. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}

## Response `200`

Success

- Version — Version represents a document version.
  - `created_at` string, date-time, required — Timestamp when version was created.
  - `created_by` Subject, required — 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. subject_type_matches_id_prefix // id prefix must match type (user_ for user, bot_ for bot)
    - `id` string, required — Unique ID. user_xxx for users, bot_xxx for bots.
    - `name` string, required — Display name of the user or bot.
    - `type` 'user' | 'bot', required
  - `description` string, nullable — Description of changes in this version.
  - `document_id` string, required — Parent document ID. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}
  - `id` string, required — Unique ID for the version. Pattern: ver_[0-9a-hjkmnp-tv-z]{26}
  - `processing_status` 'processing' | 'ready' | 'failed', required
  - `title` string, nullable — Optional version title.
  - `url` string, uri, required — URL for accessing this version on Factify.

## 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

## Changes

- **2026-03-16** `cb42a69ce465` — 2 breaking
  - the request property `description` became not nullable
  - the request property `title` became not nullable
- **2026-03-05** `a7e69986914e` — 2 warning, 4 info
  - added the new `bot` enum value to the `created_by/type` response property for the response status `200`
  - added the new `user` enum value to the `created_by/type` response property for the response status `200`
  - added discriminator to `created_by` response property for the response status `200`
  - removed the `service_account` enum value from the `created_by/type` response property for the response status `200`
  - …2 more

[Change history](https://skmtc.dev/factify-inc/apis/factify-api/changes/v1beta/documents/:document_id/versions/post.md)

---

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