Skip to main content
GET
/
v1
/
documents
/
{document_id}
/
policies
List policies attached to a document
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.factify.com/v1/documents/{document_id}/policies', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "items": [
    {
      "document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
      "attached_at": "2025-01-15T10:35:00Z",
      "policy": {
        "id": "pol_01h2xcejqtf2nbrexx3vqjhp41",
        "org_id": "org_01h2xcejqtf2nbrexx3vqjhp41",
        "name": "Default lead-gen policy",
        "created_at": "2025-01-15T10:30:00Z",
        "updated_at": "2025-01-15T10:35:00Z"
      }
    }
  ],
  "next_page_token": "pol_01h2xcejqtf2nbrexx3vqjhp41"
}

Documentation Index

Fetch the complete documentation index at: https://developers.factify.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication using a factapi-issued API key (ffy_<env>_<base32_uuid><base62_random>). Cookie-based sessions are accepted automatically by user-facing endpoints but are not surfaced as an OpenAPI auth scheme.

Path Parameters

document_id
string
required

Document whose attached policies to list.

Example:

"doc_01h2xcejqtf2nbrexx3vqjhp41"

Query Parameters

page_size
integer<int64>
default:50

Maximum number of attachments per page. Values outside 1-100 are clamped to that range; the default is 50.

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

50

page_token
string

Opaque cursor from a previous response's next_page_token. Omit or leave empty for the first page.

Response

OK

Page of policy attachments for a document.

items
object[]
required

Policy attachments on this page, ordered by policy id ascending. The next page_token echoes the last policy id seen.

next_page_token
string

Opaque cursor for the next page. Pass back as the page_token query parameter; omitted when no more attachments are available.

Example:

"pol_01h2xcejqtf2nbrexx3vqjhp41"