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

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

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

  console.log(result);
}

run();
{
  "error": "<string>",
  "success": true
}

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}$
recipient_id
string
required

Recipient ID (TypeID: user_xxx or bot_xxx).

Pattern: ^(user|bot)_[0-9a-hjkmnp-tv-z]{26}$

Body

application/json

UpdateDocumentAccessRequest updates a single recipient's role.

document_role
enum<string>
required

New role to assign.

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

Response

Success

UpdateDocumentAccessResponse contains the result of updating access.

error
string

Error message if the update failed.

success
boolean

Whether the update succeeded.