const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'viewer'})
};
fetch('https://api.factify.com/v1/documents/{document_id}/access-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "arq_01h2xcejqtf2nbrexx3vqjhp41",
"document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"requester": "usr_01h2xcejqtf2nbrexx3vqjhp41",
"role": "viewer",
"status": "pending",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"reviewed_by": "<string>"
}Request access to a document
Creates a new access request for a document the caller doesn’t
currently have access to. Document owners and admins are
notified to approve or deny. Use checkMyAccessRequest to poll
the request’s state.
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({role: 'viewer'})
};
fetch('https://api.factify.com/v1/documents/{document_id}/access-requests', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "arq_01h2xcejqtf2nbrexx3vqjhp41",
"document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
"requester": "usr_01h2xcejqtf2nbrexx3vqjhp41",
"role": "viewer",
"status": "pending",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z",
"reviewed_by": "<string>"
}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 ID
"doc_01h2xcejqtf2nbrexx3vqjhp41"
Body
Requested access role
admin, collaborator, commenter, viewer "viewer"
Response
OK
A user's request for access to a document they don't currently
have permission to view. Owners and admins approve or deny;
the requester polls via checkMyAccessRequest.
Unique access request ID. Pattern arq_[0-9a-hjkmnp-tv-z]{26}.
"arq_01h2xcejqtf2nbrexx3vqjhp41"
ID of the document the request is for.
"doc_01h2xcejqtf2nbrexx3vqjhp41"
User ID of the user who requested access.
"usr_01h2xcejqtf2nbrexx3vqjhp41"
Role the requester is asking for (admin, collaborator, commenter, or viewer).
"viewer"
Lifecycle state of the request — pending, approved, or denied.
"pending"
Timestamp when the request was created.
"2025-01-15T10:30:00Z"
Timestamp of the last status change (creation, approval, or denial).
"2025-01-15T10:30:00Z"
User ID of the admin who approved or denied the request. Absent while status == "pending".