---
title: "Create a space role"
method: POST
path: "/space-roles"
tags: ["Space Roles"]
---

# Create a space role

`POST /space-roles`

Create a space role.

Available on tenants with [Role-Based Access Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). 

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
User must be an organization or site admin. Connect and Forge app users are not authorized to access this resource.

## Request body

- object
  - `name` string, required — Name of the space role
  - `description` string, required — Description for the space role
  - `spacePermissions` string[], required — The ids of the space permissions associated with the space role. Sample value "read/space"; retrieve ids from responses returned by [GET /space-permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) endpoint

## Response `201`

Returned if the requested space role is created.

- SpaceRole
  - `id` string — The identifier for the space role.
  - `type` 'SYSTEM' | 'CUSTOM' — The role type.
  - `name` string — The name for the space role.
  - `description` string — The description for the space role’s usage.
  - `spacePermissions` string[] — The space permissions the space role is comprised of.

## Other responses

- `400` — Returned if an invalid request is provided.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.
- `404` — Returned if the calling user does not have permission to create space roles.

---

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