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

Add a user to a specified group

Adds given user to a group

POST/api/2/group/user
Authorization
AuthorizationBasic auth · headerrequired

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

Query parameters
groupnamestringrequired

A name of requested group.

Request body
application/json
namestring
Responses
201

Returns full representation of a Jira group in JSON format.

namestring
selfstring<uri>
usersPagedListWrapperUserJsonBeanApplicationUser
Show properties
backingListSizeinteger<int32>
callbackListWrapperCallbackUserJsonBean
itemsUserJsonBean[]
Show properties
Array of UserJsonBean
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
maxResultsinteger<int32>
pagingCallbackListWrapperCallbackUserJsonBean
sizeinteger<int32>
400

Returned if user requested an empty group name or the user already belongs to the group.

401

Returned if the current user is not authenticated.

403

Returned if the current user does not have administrator permissions.

404

Returned if the requested group was not found or requested user was not found.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'http://jira.example.com/rest/api/2/group/user?groupname=string' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "charlie"
}'
Response
{
  "name": "jira-administrators",
  "self": "http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators",
  "users": {
    "backingListSize": 0,
    "callback": {},
    "items": [],
    "maxResults": 50,
    "pagingCallback": {},
    "size": 50
  }
}

Was this page helpful?