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"
}List policies attached to a document
Returns the access policies currently attached to the document,
with keyset cursor pagination. Policies are evaluated in
addition to explicit shares and the document’s general access
level — attaching a policy can extend access (for example, to
a lead-capture form) but cannot revoke explicit grants. The
caller must have manage_access capability on the 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
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 whose attached policies to list.
"doc_01h2xcejqtf2nbrexx3vqjhp41"
Query Parameters
Maximum number of attachments per page. Values outside 1-100 are clamped to that range; the default is 50.
1 <= x <= 10050
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.
Policy attachments on this page, ordered by policy id
ascending. The next page_token echoes the last policy
id seen.
Show child attributes
Show child attributes
Opaque cursor for the next page. Pass back as the
page_token query parameter; omitted when no more
attachments are available.
"pol_01h2xcejqtf2nbrexx3vqjhp41"