Skip to main content
PATCH
/
v1
/
documents
/
{documentId}
/
permissions
Update document permissions
curl --request PATCH \
  --url https://{instance}.omniapp.co/api/v1/documents/{documentId}/permissions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "role": "NO_ACCESS",
  "accessBoost": false,
  "userIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "userGroupIds": [
    "<string>"
  ]
}
'
{
"success": true
}

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

documentId
string
required

The document identifier. To retrieve the ID, navigate to File > Document settings in the document and then click Settings. The Identifier field contains the document ID.

Body

application/json
role
enum<string>
required

The content role to assign. Must be one of:

  • NO_ACCESS - No access. Document won't appear in content system or search results.
  • VIEWER - View dashboard
  • EXPLORER - View and explore dashboard and workbook
  • EDITOR - Edit dashboard and workbook
  • MANAGER - Edit dashboard and workbook and manage permissions
Available options:
NO_ACCESS,
VIEWER,
EXPLORER,
EDITOR,
MANAGER
accessBoost
boolean
default:false

If true, AccessBoost will be enabled for the document.

userIds
string<uuid>[]

The list of user IDs to update permissions for. Use the List users and List embed users endpoints to retrieve user IDs. Either userIds or userGroupIds is required.

userGroupIds
string[]

The list of user group IDs to update permissions for. Use the List user groups endpoint to retrieve user group IDs. Either userIds or userGroupIds is required.

Response

Permissions updated successfully

success
boolean
Example:

true