Skip to main content
POST
/
v1beta
/
documents
/
{document_id}
/
share
TypeScript
import { Factify } from "@factify/sdk";

const factify = new Factify({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await factify.sharing.grant({
    documentId: "<id>",
    body: {},
  });

  console.log(result);
}

run();
{
  "document_id": "<string>",
  "failed": 123,
  "results": [
    {
      "error": "<string>",
      "recipient": "<string>",
      "success": true
    }
  ],
  "successful": 123,
  "total": 123
}

Authorizations

Authorization
string
header
required

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

Path Parameters

document_id
string
required

Document ID.

Pattern: ^doc_[0-9a-hjkmnp-tv-z]{26}$

Body

application/json

GrantDocumentAccessRequest grants access to one or more recipients.

custom_message
string | null

Custom message to include in the notification email.

recipients
RecipientGrant · object[]

Recipients to grant access to (1-50).

Required array length: 1 - 50 elements
should_send_notification
boolean | null

Whether to send email notifications.

Response

Success

GrantDocumentAccessResponse contains the results of granting access.

document_id
string

Document ID.

failed
integer

Number of failed grants.

results
AccessGrantResult · object[]

Results for each recipient.

successful
integer

Number of successful grants.

total
integer

Total number of recipients processed.