Skip to main content
PUT
/
v1beta
/
documents
/
{document_id}
/
general-access
TypeScript
import { Factify } from "@factify/sdk";

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

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

  console.log(result);
}

run();
{
  "document_id": "<string>",
  "general_access_level": "restricted"
}

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

SetGeneralAccessRequest sets the general access level.

general_access_level
enum<string>
required

General access level to set.

Available options:
restricted,
organization,
anyone_with_link

Response

Success

SetGeneralAccessResponse contains the updated general access level.

document_id
string

Document ID.

general_access_level
enum<string>

The applied general access level.

Available options:
restricted,
organization,
anyone_with_link