Skip to main content
POST
/
v1
/
documents
/
{document_id}
/
access-requests
Request access to a document
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

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 ID

Example:

"doc_01h2xcejqtf2nbrexx3vqjhp41"

Body

application/json
role
enum<string>
required

Requested access role

Available options:
admin,
collaborator,
commenter,
viewer
Example:

"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.

id
string
required

Unique access request ID. Pattern arq_[0-9a-hjkmnp-tv-z]{26}.

Example:

"arq_01h2xcejqtf2nbrexx3vqjhp41"

document_id
string
required

ID of the document the request is for.

Example:

"doc_01h2xcejqtf2nbrexx3vqjhp41"

requester
string
required

User ID of the user who requested access.

Example:

"usr_01h2xcejqtf2nbrexx3vqjhp41"

role
string
required

Role the requester is asking for (admin, collaborator, commenter, or viewer).

Example:

"viewer"

status
string
required

Lifecycle state of the request — pending, approved, or denied.

Example:

"pending"

created_at
string<date-time>
required

Timestamp when the request was created.

Example:

"2025-01-15T10:30:00Z"

updated_at
string<date-time>
required

Timestamp of the last status change (creation, approval, or denial).

Example:

"2025-01-15T10:30:00Z"

reviewed_by
string

User ID of the admin who approved or denied the request. Absent while status == "pending".