---
title: "Create a document"
method: POST
path: "/v1beta/documents"
tags: ["Documents"]
---

# Create a document

`POST /v1beta/documents`

Creates a new document by uploading a PDF file.

## Response `200`

Success

- CreateDocumentResponse — CreateDocumentResponse contains the newly created document.
  - `document` Document, required — Document represents a Factify document.
    - `access_level` 'private' | 'organization' | 'public', required
    - `created_at` string, date-time, required — Timestamp when document 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
    - `current_version` VersionRef — VersionRef is a lightweight reference to a version.
      - `id` string, required — Version ID. Pattern: ver_[0-9a-hjkmnp-tv-z]{26}
    - `description` string, nullable — Optional document description.
    - `general_access` 'private' | 'organization' | 'public'
    - `id` string, required — Unique ID for the document. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}
    - `is_demo` boolean — Whether this document is a demo document created during FTUE onboarding.
    - `last_viewed_at` string, date-time — Timestamp when the authenticated user last viewed this document. Absent if the user has never viewed it.
    - `owner_organization_id` string — Organization that owns this document (via the document creator). Empty if the owner's organization could not be resolved.
    - `permission_set` DocumentPermissionSet — DocumentPermissionSet contains the permissions the authenticated user has on a document.
      - `attach_policy` boolean
      - `comment_private` boolean
      - `comment_public` boolean
      - `copy_content` boolean
      - `create_version` boolean
      - `export` boolean
      - `grant_access` boolean
      - `list_versions` boolean
      - `manage_access` boolean
      - `open` boolean
      - `screenshot` boolean
      - `trash` boolean
      - `view` boolean
      - `view_analytics` boolean
      - `view_leads` boolean
      - `view_timeline` boolean
    - `processing_status` 'processing' | 'ready' | 'failed', required
    - `shared_at` string, date-time — Timestamp when this document was last shared to the authenticated user. Absent if the document was never shared to them.
    - `source_format` string — Original file format of the document's current version (e.g., "pdf", "docx", "xlsx", "csv", "markdown"). Output-only field — not validated on input. Values are always one of the canonical format names written by the upload layer; arbitrary strings will not appear here.
    - `thumbnail_url` string — URL of the document thumbnail image.
    - `title` string, required — Document title.
    - `trashed_at` string, date-time — Timestamp when the document was trashed, if applicable. Absent if the document is not trashed.
    - `updated_at` string, date-time — Timestamp when document was last updated.
    - `url` string, uri, required — URL for accessing the document 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

---

[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)
