---
title: "POST /spaces/{spaceId}/roles"
method: POST
path: "/spaces/{spaceId}/roles"
---

# POST /spaces/{spaceId}/roles

`POST /spaces/{spaceId}/roles`

Add a role to multiple users or groups in a private re:Post.

## Path parameters

- `spaceId` string, required

## Request body

- object
  - `accessorIds` AccessorId[], required — The user or group accessor identifiers to add the role to.
  - `role` 'EXPERT' | 'MODERATOR' | 'ADMINISTRATOR' | 'SUPPORTREQUESTOR', required — The role to add to the users or groups.

## Response `200`

Success

- BatchAddRoleOutput
  - `addedAccessorIds` AccessorId[], required — An array of successfully updated accessor identifiers.
  - `errors` BatchError[], required — An array of errors that occurred when roles were added.
    - `accessorId` string, required — The accessor identifier that's related to the error.
    - `error` integer, required — The error code.
    - `message` string, required — Description of the error.

## Other responses

- `480` — ValidationException
- `481` — AccessDeniedException
- `482` — ResourceNotFoundException
- `483` — ThrottlingException
- `484` — InternalServerException

---

[API](https://skmtc.net/aws/apis/repostspace.md) · [All operations](https://skmtc.net/aws/apis/repostspace/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/repostspace/versions/1b4ca9ef5474/schema)
