SCIM API examples
These SCIM API examples show the requests developers usually need when testing user provisioning. Use them with the hosted SCIM test server, the interactive SCIM Playground, or your own SCIM 2.0 implementation.
The hosted base URL is:
https://api.scim.dev/scim/v2/Add your API key as a bearer token:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/scim+jsonDiscover server capabilities
Use /ServiceProviderConfig to see which SCIM features are enabled.
GET /scim/v2/ServiceProviderConfig HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEYRelated playground page: Service Provider Config.
List schemas
Use /Schemas when you need to inspect supported user, group, and extension attributes.
GET /scim/v2/Schemas HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEYRelated playground page: Schemas.
Create a user
POST /scim/v2/Users HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEY
Content-Type: application/scim+json{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "alex@example.com",
"name": {
"givenName": "Alex",
"familyName": "Morgan"
},
"emails": [
{
"value": "alex@example.com",
"primary": true
}
],
"active": true
}Related playground page: Users.
Find a user by userName
Identity providers often look up a user before creating or updating it.
GET /scim/v2/Users?filter=userName%20eq%20%22alex%40example.com%22 HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEYRelated playground page: .search.
Update a user with PATCH
Use PATCH for targeted profile changes and activation changes.
PATCH /scim/v2/Users/USER_ID HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEY
Content-Type: application/scim+json{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{
"op": "replace",
"path": "active",
"value": false
}
]
}Create a group
POST /scim/v2/Groups HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEY
Content-Type: application/scim+json{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"displayName": "Engineering",
"members": [
{
"value": "USER_ID",
"display": "alex@example.com"
}
]
}Related playground page: Groups.
Add a user to a group
PATCH /scim/v2/Groups/GROUP_ID HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEY
Content-Type: application/scim+json{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{
"op": "add",
"path": "members",
"value": [
{
"value": "USER_ID"
}
]
}
]
}Test ETags
ETags help prevent overwriting changes with stale updates.
GET /scim/v2/Users/USER_ID HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEYThen send the returned ETag with an update:
PATCH /scim/v2/Users/USER_ID HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEY
If-Match: W/"etag-value"
Content-Type: application/scim+jsonRelated playground page: ETag.
Send a bulk request
POST /scim/v2/Bulk HTTP/1.1
Host: api.scim.dev
Authorization: Bearer YOUR_API_KEY
Content-Type: application/scim+json{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkRequest"],
"Operations": [
{
"method": "POST",
"path": "/Users",
"bulkId": "new-user",
"data": {
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "bulk.user@example.com",
"active": true
}
}
]
}Related playground page: Bulk.
Next steps
If you are implementing SCIM in your own application, continue with the SCIM implementation checklist. If you need a safe endpoint for an identity provider, start with the SCIM test server.