---
title: "Update document permissions"
method: POST
path: "/api/index/v1/updatepermissions"
tags: ["Documents"]
---

# Update document permissions

`POST /api/index/v1/updatepermissions`

Updates the permissions for a given document without modifying document content.

## Request body

- UpdatePermissionsRequest — Describes the request body of the /updatepermissions API call
  - `datasource` string, required
  - `objectType` string — The type of the document (Case, KnowledgeArticle for Salesforce for example). It cannot have spaces or _
  - `id` string — The datasource specific id for the document. This field is case insensitive and should not be more than 200 characters in length.
  - `viewURL` string — The permalink for viewing the document. **Note: viewURL is a required field if id was not set when uploading the document.**'
  - `permissions` DocumentPermissionsDefinition, required — describes the access control details of the document
    - `allowedUsers` UserReferenceDefinition[] — List of users who can view the document
      - `email` string
      - `datasourceUserId` string — some datasources refer to the user by the datasource user id in the document
      - `name` string
    - `allowedGroups` string[] — List of groups that can view the document
    - `allowedGroupIntersections` PermissionsGroupIntersectionDefinition[] — List of allowed group intersections. This describes a permissions constraint of the form ((GroupA AND GroupB AND GroupC) OR (GroupX AND GroupY) OR ...
      - `requiredGroups` string[]
    - `allowAnonymousAccess` boolean — If true, then any Glean user can view the document
    - `allowAllDatasourceUsersAccess` boolean — If true, then any user who has an account in the datasource can view the document.

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `401` — Not Authorized
- `409` — Conflict
- `429` — Too Many Requests

---

[API](https://skmtc.net/gleanwork/apis/glean-indexing-api.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-indexing-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-indexing-api/revisions/1c92beda1a4f/schema)
