Skip to main content

Create a User

Create a new user, checking if the user already exists before adding.

POST
/api/scim/v2/Users

Headers

KeyValue
Content-Typeapplication/json
AuthorizationBearer <API Token>

Request Body

{
"userName": "newuser@example.com",
"active": true,
"emails": [
{
"value": "newuser@example.com",
"primary": true
}
],
"profileUrl": "https://example.com/user/newuser"
}

Example cURL

curl --location --request POST 'http://localhost:8080/api/scim/v2/Users' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
--data-raw '{
"userName": "newuser@example.com",
"active": true,
"emails": [
{
"value": "newuser@example.com",
"primary": true
}
],
"profileUrl": "https://example.com/user/newuser"
}'

Responses

Status CodeDescriptionResponse
200User created successfullyapplication/json
400Invalid Requestempty
401Unauthorizedempty
500Internal Server Errorempty

Sample response

200 : User created successfully

{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": "563505",
"userName": "newuser@example.com",
"active": true,
"emails": [
{
"value": "newuser@example.com",
"primary": true
}
],
"profileUrl": "https://example.com/user/newuser"
}