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

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

async function run() {
  const result = await factify.documents.export({
    documentId: "doc_01h2xcejqtf2nbrexx3vqjhp41",
    versionId: "ver_01h2abcd1234efgh5678jkmnpt",
  });

  console.log(result);
}

run();
{
  "expires_at": "2023-11-07T05:31:56Z",
  "url": "<string>",
  "headers": {}
}

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.

Pattern: ^doc_[0-9a-hjkmnp-tv-z]{26}$
Example:

"doc_01h2xcejqtf2nbrexx3vqjhp41"

Query Parameters

version_id
string

Optional version ID. If omitted, exports the current version.

Pattern: ^ver_[0-9a-hjkmnp-tv-z]{26}$
Example:

"ver_01h2abcd1234efgh5678jkmnpt"

Response

Success

ExportDocumentResponse contains the download URL.

expires_at
string<date-time>
required

Timestamp when the download URL expires.

url
string
required

Presigned URL to download the document PDF.

headers
headers · object

HTTP headers to include when fetching the URL.