Skip to main content

Patch User (SCIM)

Partially update a user using SCIM 2.0 PATCH operation.

Quick Navigation

Endpoint

PATCH /scim/v2/Users/{user_id}

Headers

HeaderRequiredDescription
AuthorizationYesBearer <scim_bearer_token>
Content-TypeYesapplication/scim+json
AcceptYesapplication/scim+json or application/json

Path Parameters

ParameterTypeRequiredDescription
user_idstringYesUser ID

Request Body

{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{
"op": "replace",
"path": "name.givenName",
"value": "Jane"
},
{
"op": "replace",
"path": "active",
"value": false
}
]
}

Operations

Supported operations:

  • add - Add a new value
  • remove - Remove a value
  • replace - Replace a value

Response

Success (200)

{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": "123",
"userName": "user@example.com",
"name": {
"formatted": "Jane Doe",
"familyName": "Doe",
"givenName": "Jane"
},
"active": false,
"emails": [
{
"value": "user@example.com",
"primary": true
}
],
"meta": {
"resourceType": "User",
"created": "2024-01-01T12:00:00Z",
"lastModified": "2024-01-01T14:00:00Z",
"location": "/scim/v2/Users/123"
}
}

Features

  • SCIM 2.0 compliant
  • Partial updates only (specify only fields to change)
  • Supports add, remove, and replace operations
  • More efficient than PUT for small changes

Example

curl -X PATCH "https://api.rivergen.com/scim/v2/Users/123" \
-H "Authorization: Bearer <scim_bearer_token>" \
-H "Content-Type: application/scim+json" \
-H "Accept: application/scim+json" \
-d '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{
"op": "replace",
"path": "active",
"value": false
}
]
}'