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

Create user

One of the following options could be used:

  1. Create a user with a specified password. The userName, fullName, email and password needs to be specified.

  2. Create a user with an email notification to the user. The userName, fullName, email and notifyViaEmail (true) needs to be specified.

Requirements:

  • The userName should not be null or blank

  • The userName should not contain any of these characters \ , + < > ’ “

  • The userName should not contain any whitespace characters

  • The userName should not be “anonymous”

  • The userName should not contain any upper case characters

  • The fullName should not be null or blank

  • The fullName should not contain any of these characters

  • The fullName should not be “anonymous”

  • The email should not be null or blank

  • The email should be a valid email address

  • If notifyViaEmail is false then the password should not be null or blank

  • If notifyViaEmail is true then the password should not be specified

POST/rest/api/admin/user
Request body
application/json

Details of the user to be created

userNamestring
fullNamestring
emailstring
passwordstring
notifyViaEmailboolean
Responses
201

returns a response with generated UserKey for the created user.

userKeystring
400

returned if any error occurs while creating the user

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
401

returned if an anonymous (or unauthenticated) user tries to create a user

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
402

returned if no more licenses available to create a user

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
403

returned if user does not have enough permission to create a user

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
409

returned if the user with the same userName already exists

statusCodeinteger<int32>
dataValidationResult
Show properties
authorizedboolean
validboolean
errorsobject
successfulboolean
allowedInReadOnlyModeboolean
messagestring
reasonstring
Try it
Server
Bodyapplication/json
Request
curl -X POST 'http://example.com:7990/confluence/rest/api/admin/user' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "userName": "user1",
  "fullName": "Some User",
  "email": "someuser@someemail.com",
  "password": "password",
  "notifyViaEmail": true
}'
Response
{
  "userKey": "4028d6768851c8900188556ba6000014"
}

Was this page helpful?