Create a User
Create a new user, checking if the user already exists before adding.
POST
/api/scim/v2/Users
Headers
Key | Value |
---|---|
Content-Type | application/json |
Authorization | Bearer <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 Code | Description | Response |
---|---|---|
200 | User created successfully | application/json |
400 | Invalid Request | empty |
401 | Unauthorized | empty |
500 | Internal Server Error | empty |
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"
}