---
ai:
  exclude: true
search:
  tags:
    - role
    - POST
seo:
  description: >-
    Adds default actors to the given role. The… Reference for the POST
    /api/2/role/{id}/actors endpoint in the Jira Software Data Center REST API
    Reference.
sidebar:
  label: Adds default actors to a role
  badge: POST
title: Adds default actors to a role
type: openapi-operation
---
Adds default actors to the given role. The request data should contain a list of usernames or a list of groups to add.

`POST /api/2/role/{id}/actors`

**Request body** (`application/json`)

- `group` (string[])
- `user` (string[])

Request body example:

```json
{
  "group": [
    "string"
  ],
  "user": [
    "string"
  ]
}
```

**Responses**

- `200` — Returns actor list.
- `400` — Returned if the request json does not have a user or group field or both user and group fields are given.
- `401` — Returned if the requesting user is not logged in.
- `403` — Returned if the requesting user is not an admin or a sysadmin.
- `404` — Returned if the role with the given id does not exist.

Response example, 200:

```json
{
  "actors": [
    {
      "name": "jira-developers"
    }
  ]
}
```
