Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Create a new project role

Creates a new ProjectRole to be available in Jira. The created role does not have any default actors assigned.

POST/api/2/role
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Request body
requiredapplication/json

The role to create

descriptionstring
namestring
Responses
200

Returns full details of the created role

actorsRoleActorBean[]
Show properties
Array of RoleActorBean
namestring
descriptionstring
idinteger<int64>
namestring
selfstring<uri>
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.

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'http://jira.example.com/rest/api/2/role' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "description": "role description",
  "name": "MyRole"
}'
Response
{
  "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"
}

Was this page helpful?