---
ai:
  exclude: true
search:
  tags:
    - role
    - POST
seo:
  description: >-
    Creates a new ProjectRole to be available in Jira. The… Reference for the
    POST /api/2/role endpoint in the Jira Software Data Center REST API
    Reference.
sidebar:
  label: Create a new project role
  badge: POST
title: Create a new project role
type: openapi-operation
---
Creates a new ProjectRole to be available in Jira. The created role does not have any default actors assigned.

`POST /api/2/role`

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

The role to create

- `description` (string)
- `name` (string)

Request body example:

```json
{
  "description": "role description",
  "name": "MyRole"
}
```

**Responses**

- `200` — Returns full details of the created role
- `400` — Returned if the request json does not have a name field or the name field is invalid (empty or starts or ends with whitespace)
- `401` — Returned if you are not logged in.
- `403` — Returned if you do not have permissions to create a role.
- `409` — Returned if a role with given name already exists.

Response example, 200:

```json
{
  "actors": [
    {
      "name": "jira-developers"
    }
  ],
  "description": "A project role that represents developers in a project",
  "id": 10360,
  "name": "Developers",
  "self": "http://www.example.com/jira/rest/api/2/project/MKY/role/10360"
}
```
