Update a User
Update an existing User by ID.
PATCH
/api/scim/v2/Users/{id}
Headers
Key | Value |
---|---|
Accept | application/json |
Content-Type | application/json |
Authorization | Bearer <API Token> |
Path Parameter
id
(required): User ID for the user to be updated.
Request Body
Provide the properties of the User that you want to update.
{
"userName": "updateduser@example.com",
"active": false,
"emails": [
{
"value": "updateduser@example.com",
"primary": true
}
],
"profileUrl": "https://example.com/user/updateduser"
}
Example cURL
Replace {id} with the actual User ID you want to update:
curl --location --request PATCH 'http://localhost:8080/api/scim/v2/Users/{id}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' \
--data-raw '{
"userName": "updateduser@example.com",
"active": false,
"emails": [
{
"value": "updateduser@example.com",
"primary": true
}
],
"profileUrl": "https://example.com/user/updateduser"
}'
Responses
Status Code | Description | Response |
---|---|---|
200 | User updated successfully | empty |
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"
}