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

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

async function run() {
  const result = await factify.documents.list({
    pageToken: "eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0",
  });

  for await (const page of result) {
    console.log(page);
  }
}

run();
{
  "pagination": {
    "has_more": true,
    "next_page_token": "eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0",
    "prev_page_token": "eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJwcmV2In0"
  },
  "items": [
    {
      "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://app.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.

Query Parameters

page_token
string

Opaque pagination token from a previous response. Pass next_page_token or prev_page_token from a previous response to continue pagination. Empty or omitted for the first page.

Example:

"eyJpZCI6ImRvY18wMWgyeGNlanF0ZjJuYnJleHgzdnFqaHA0MSIsImQiOiJuZXh0In0"

page_size
integer<int32>

Maximum number of items to return per page (1-100). Default: 50.

Required range: 1 <= x <= 100
created_by_id
string[]

Filter by creator ID(s). Returns documents matching ANY of the specified IDs.

User or service account TypeID (e.g., user_xxx, svc_yyy)

access_level
enum<string>[]

Filter by access level(s). Returns documents matching ANY of the specified levels.

Access level

Available options:
private,
organization,
public
processing_status
enum<string>[]

Filter by processing status(es). Returns documents matching ANY of the specified statuses.

Processing status

Available options:
processing,
ready,
failed
created.after
string<date-time>

Filter by created.after (RFC 3339 format, e.g., 2024-01-15T09:30:00Z)

Response

Success

ListDocumentsResponse contains a page of documents.

pagination
pagination · object
required

Pagination metadata.

items
Document · object[]

List of documents.