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({
    limit: 50,
    cursor: "eyJsYXN0X2lkIjoiZG9jXzAxaDJ4Y2VqcXRmMm5icmV4eDN2cWpocDQxIn0",
  });

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

run();
{
  "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://d.factify.com/d/01h2xcejqtf2nbrexx3vqjhp41",
      "current_version": {
        "id": "ver_01h2abcd1234efgh5678jkmnpt"
      },
      "description": "Quarterly financial report for Q4 2024"
    }
  ],
  "pagination": {
    "has_more": true,
    "next_cursor": "eyJsYXN0X2lkIjoiZG9jXzAxaDJ4Y2VqcXRmMm5icmV4eDN2cWpocDQxIn0"
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

limit
integer<int32>

Number of results to return (1-100). Default: 50.

Required range: 1 <= x <= 100
Example:

50

cursor
string

Opaque pagination cursor from previous response. Format: Base64-encoded string from the pagination.next_cursor field.

Example:

"eyJsYXN0X2lkIjoiZG9jXzAxaDJ4Y2VqcXRmMm5icmV4eDN2cWpocDQxIn0"

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.

items
Document · object[]

List of documents.

pagination
pagination · object

Pagination metadata.