---
title: "Add new permission to space"
method: POST
path: "/wiki/rest/api/space/{spaceKey}/permission"
tags: ["Space permissions"]
---

# Add new permission to space

`POST /wiki/rest/api/space/{spaceKey}/permission`

Adds new permission to space.

If the permission to be added is a group permission, the group can be identified
by its group name or group id.

Note: Apps cannot access this REST resource - including when utilizing user impersonation.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
'Admin' permission for the space.

## Path parameters

- `spaceKey` string, required

## Request body

- SpacePermissionRequest — This object represents the request for the single space permission. Permissions consist of one operation object with an accompanying subjects object. The following combinations of `operation.key` and `operation.target` values are valid for the `operation` object: ``` bash 'create': 'page', 'blogpost', 'comment', 'attachment' 'read': 'space' 'delete': 'page', 'blogpost', 'comment', 'attachment', 'space' 'export': 'space' 'administer': 'space' 'archive': 'page' 'restrict_content': 'space' ``` For example, to enable Delete Own permission, set the `operation` object to the following: ``` "operation": { "key": "delete", "target": "space" } ``` To enable Add/Delete Restrictions permissions, set the `operation` object to the following: ``` "operation": { "key": "restrict_content", "target": "space" } ```
  - `subject` PermissionSubject, required — The user or group that the permission applies to.
    - `type` 'user' | 'group', required
    - `identifier` string, required — for `type=user`, identifier should be user's accountId or `anonymous` for anonymous users for `type=group`, identifier should be the groupId.
  - `operation` object, required
    - `key` 'administer' | 'archive' | 'copy' | 'create' | 'delete' | 'export' | 'move' | 'purge' | 'purge_version' | 'read' | 'restore' | 'restrict_content' | 'update' | 'use', required
    - `target` 'page' | 'blogpost' | 'comment' | 'attachment' | 'space', required — The space or content type that the operation applies to.
  - `_links` GenericLinks

## Response `200`

Returned if the requested content is returned.

- SpacePermissionV2 — This object represents a single space permission. Permissions consist of at least one operation object with an accompanying subjects object. The following combinations of `operation.key` and `operation.target` values are valid for the `operation` object: ``` bash 'create': 'page', 'blogpost', 'comment', 'attachment' 'read': 'space' 'delete': 'page', 'blogpost', 'comment', 'attachment', 'space' 'export': 'space' 'administer': 'space' 'archive': 'page' 'restrict_content': 'space' ``` For example, to enable Delete Own permission, set the `operation` object to the following: ``` "operation": { "key": "delete", "target": "space" } ``` To enable Add/Delete Restrictions permissions, set the `operation` object to the following: ``` "operation": { "key": "restrict_content", "target": "space" } ```
  - `id` integer, required
  - `subject` PermissionSubject, required — The user or group that the permission applies to.
    - `type` 'user' | 'group', required
    - `identifier` string, required — for `type=user`, identifier should be user's accountId or `anonymous` for anonymous users for `type=group`, identifier should be the groupId.
  - `operation` object, required
    - `key` 'administer' | 'archive' | 'copy' | 'create' | 'delete' | 'export' | 'move' | 'purge' | 'purge_version' | 'read' | 'restore' | 'restrict_content' | 'update' | 'use', required
    - `target` 'page' | 'blogpost' | 'comment' | 'attachment' | 'space', required — The space or content type that the operation applies to.
  - `_links` GenericLinks

## Other responses

- `400` — Used for various errors. Such as: - Permission already exists for the given user or group. - 'read space' permission doesn't exist for the given user or group. - No group found with the given groupName or groupId
- `401` — Returned if the authentication credentials are incorrect or missing from the request.
- `403` — Returned if the user isn't authorized.
- `404` — Returned if any of the following is true: - There is no space with the given key. - The calling user does not have permission to view the space.

---

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