Skip to main content

Example: Update Users with SCIM

To update a user with SCIM, either send a PATCH or PUT request to the Users/<user_id> endpoint.

Gregory Claeyssens avatar
Written by Gregory Claeyssens
Updated this week

PUT /Users/<user_id>

Use PUT when you want to completely replace the user’s current data with new values. Any fields not included in the PUT request will be cleared or reset.

Expect a 404 error if there is no User matching the <user_id>.

For a full overview, see the schema reference here and the documentation about our SCIM implementation here.

Request:

PUT https://api.storychief.io/scim/v2/Users/1
Accept: application/scim+json
Content-Type: application/scim+json
Authorization: ••••••

{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"userName": "jane.doe@example.com",
"externalId": "12345",
"name": {
"givenName": "Jane",
"familyName": "Doe"
},
"emails": [
{
"value": "jane.doe@example.com",
"type": "work",
"primary": true
}
],
"roles": [
{
"value": "admin"
}
],
"active": true
}

Response:

HTTP/1.1 200 OK

{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": 1,
"meta": {
"created": "2025-06-23T11:02:15+02:00",
"lastModified": "2025-06-23T11:02:15+02:00",
"location": "https://api.storychief.io/scim/v2/Users/1",
"resourceType": "User",
"version": "W/\"a12a2ad8c90b51b343a9987230b372ee411e0275\""
},
"name": {
"familyName": "Doe",
"givenName": "Jane"
},
"userName": "jane.doe@example.com",
"emails": [
{
"value": "jane.doe@example.com",
"type": "work",
"primary": true
}
],
"roles": [
{
"value": "admin",
"display": "Publisher",
"type": "primary",
"primary": true
}
]
}

PATCH /Users/<user_id>

Use PATCH when you want to update just one or a few specific fields of a user, without affecting other attributes.
Expect a 404 error if there is no User matching the <user_id>.

For a full overview, see the schema reference here and the documentation about our SCIM implementation here.

Request:

PATCH https://api.storychief.io/scim/v2/Users/1
Accept: application/scim+json
Content-Type: application/scim+json
Authorization: ••••••

{
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
],
"Operations": [
{
"op": "replace",
"path": "name.givenName",
"value": "Jane"
},
{
"op": "replace",
"path": "name.familyName",
"value": "Doe"
},
{
"op": "replace",
"path": "userName",
"value": "jane.doe@example.com"
},
{
"op": "replace",
"path": "roles",
"value": [
{
"value": "admin"
}
]
}
]
}

Response:

HTTP/1.1 200 OK

{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"id": 1,
"meta": {
"created": "2025-06-23T11:02:15+02:00",
"lastModified": "2025-06-23T11:02:15+02:00",
"location": "https://api.storychief.io/scim/v2/Users/1",
"resourceType": "User",
"version": "W/\"a12a2ad8c90b51b343a9987230b372ee411e0275\""
},
"name": {
"familyName": "Doe",
"givenName": "Jane"
},
"userName": "jane.doe@example.com",
"emails": [
{
"value": "jane.doe@example.com",
"type": "work",
"primary": true
}
],
"roles": [
{
"value": "admin",
"display": "Publisher",
"type": "primary",
"primary": true
}
]
}

Did this answer your question?