Skip to main content
PATCH
/
v1beta
/
documents
/
{document_id}
TypeScript
import { Factify } from "@factify/sdk";

const factify = new Factify({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await factify.documents.update({
    documentId: "<id>",
    body: {},
  });

  console.log(result);
}

run();
{
  "document": {
    "access_level": "private",
    "created_at": "2023-11-07T05:31:56Z",
    "created_by": {
      "id": "user_01h2xcejqtf2nbrexx3vqjhp41",
      "name": "John Doe",
      "type": "user_account"
    },
    "id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
    "processing_status": "processing",
    "title": "Q4 2024 Financial Report",
    "url": "https://d.factify.com/d/01h2xcejqtf2nbrexx3vqjhp41",
    "current_version": {
      "id": "ver_01h2abcd1234efgh5678jkmnpt"
    },
    "description": "Quarterly financial report for Q4 2024"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer , where is your auth token.

Path Parameters

document_id
string
required

Document ID to update. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}

Body

application/json

UpdateDocumentRequest specifies fields to update on a document.

description
string | null

New description (max 2000 characters).

Maximum string length: 2000
title
string | null

New title (1-255 characters).

Required string length: 1 - 255

Response

Success

UpdateDocumentResponse contains the updated document.

document
document · object

The updated document.