---
title: "Add user to content restriction"
method: PUT
path: "/wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user"
tags: ["Content restrictions"]
---

# Add user to content restriction

`PUT /wiki/rest/api/content/{id}/restriction/byOperation/{operationKey}/user`

Adds a user to a content restriction. That is, grant read or update
permission to the user for a piece of content.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to edit the content.

## Path parameters

- `id` string, required
- `operationKey` string, required

## Query parameters

- `key` string
- `username` string
- `accountId` string

## Response `200`

Returned if the user is added to the content restriction. The response
body will be empty.

## Other responses

- `400` — Returned if; - Provided restrictions are invalid
- `404` — Returned if; - There is no content with the given ID. - The calling user does not have permission to view the content. - An invalid operation or group is specified.

---

[API](https://skmtc.dev/atlassian/apis/the-confluence-cloud-rest-api.md) · [All operations](https://skmtc.dev/atlassian/apis/the-confluence-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api/revisions/70088490f406/schema)
