Skip to main content

Scim API

This page documents the 20 gateway endpoints tagged scim in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.

MethodPathSummary
GET/scim/v2Discover the SCIM resource types
GET/scim/v2/GroupsList or filter SCIM groups
POST/scim/v2/GroupsCreate a SCIM group as a team
GET/scim/v2/Groups/{group_id}Read one SCIM group
PUT/scim/v2/Groups/{group_id}Replace a SCIM group
PATCH/scim/v2/Groups/{group_id}Patch a SCIM group's name or members
DELETE/scim/v2/Groups/{group_id}Delete a SCIM group and its team
GET/scim/v2/ResourceTypesList the SCIM resource types
GET/scim/v2/ResourceTypes/{resource_type_id}Read one SCIM resource type
GET/scim/v2/SchemasList the SCIM schemas
GET/scim/v2/Schemas/{schema_id}Read one SCIM schema
GET/scim/v2/ServiceProviderConfigDescribe what this SCIM service supports
GET/scim/v2/UsersList or filter SCIM users
POST/scim/v2/UsersCreate a SCIM user
GET/scim/v2/Users/{user_id}Read one SCIM user
PUT/scim/v2/Users/{user_id}Replace a SCIM user
PATCH/scim/v2/Users/{user_id}Patch a SCIM user
DELETE/scim/v2/Users/{user_id}Delete a SCIM user
GET/scim/v2/placeholdersList placeholder users that shadow real accounts
POST/scim/v2/placeholders/{user_id}/mergeMerge a placeholder user into the account it shadows

Endpoints​

GET /scim/v2​

Discover the SCIM resource types

The starting point an identity provider such as Okta or Microsoft Entra ID reads when you connect it, so it learns which kinds of records this gateway accepts: users and groups. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The User and Group resource types this gateway servesapplication/json SCIMResourceTypeList
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
Resourcesarray of SCIMResourceTypeDocumentYesThe resource types
schemasarray of stringYesAlways the SCIM ListResponse schema
totalResultsintegerYesHow many resource types there are

GET /scim/v2/Groups​

List or filter SCIM groups

Lists the teams an identity provider manages as SCIM groups, one page at a time with startIndex and count (at most 100), optionally filtered by displayName. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
startIndexqueryintegerNo
countqueryintegerNo
filterquerystring or nullNo
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/Groups" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200One page of groups, which are teamsapplication/json SCIMListResponse
400The filter uses an attribute or operator the gateway does not support (scimType invalidFilter). Only displayName eq "<value>" is supported
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
Resourcesarray of SCIMUser-Output or array of SCIMGroupYesThe records on this page
itemsPerPageinteger or nullNoHow many records this page holds
schemasarray of stringNoAlways the SCIM ListResponse schema
startIndexinteger or nullNoThe position of the first record on this page, counting from 1
totalResultsintegerYesHow many records match in all

POST /scim/v2/Groups​

Create a SCIM group as a team

Creates a gateway team from a group in the identity provider and adds the listed members. Members with no gateway user yet are created while the scim_upsert_user setting is on, the default, and refused with 400 when it is off. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.

Parameters:

NameInTypeRequiredDescription
featurequerystring or nullNo

Request body (application/json, schema SCIMGroup):

FieldTypeRequiredDescription
displayNamestringYesThe team name
externalIdstring or nullNoThe id the identity provider uses for the record
idstring or nullNoThe gateway id of the record
membersarray of SCIMMember or nullNoThe people on the team
metaobject or nullNoRecord metadata such as resourceType, created and lastModified
schemasarray of stringYesThe SCIM schema URIs the record follows

Example request:

curl -X POST "http://localhost:4000/scim/v2/Groups" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Platform",
"members": [
{
"value": "jane@example.com"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
]
}'

Responses:

StatusDescriptionBody
201The created team with the members that were usersapplication/json SCIMGroup
400A member does not exist or is outside this token's organization
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
409A team with this id already exists
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

GET /scim/v2/Groups/{group_id}​

Read one SCIM group

Returns one team as a SCIM group with its members. Answers 404 when no team with that id is visible to the token. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
group_idpathstringYes
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/Groups/group_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The group with its membersapplication/json SCIMGroup
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
404No group with this id that the token may see
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
displayNamestringYesThe team name
externalIdstring or nullNoThe id the identity provider uses for the record
idstring or nullNoThe gateway id of the record
membersarray of SCIMMember or nullNoThe people on the team
metaobject or nullNoRecord metadata such as resourceType, created and lastModified
schemasarray of stringYesThe SCIM schema URIs the record follows

PUT /scim/v2/Groups/{group_id}​

Replace a SCIM group

Replaces a team's name and its full member list with what the identity provider sends, adding and removing members to match. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.

Parameters:

NameInTypeRequiredDescription
group_idpathstringYes
featurequerystring or nullNo

Request body (application/json, schema SCIMGroup):

FieldTypeRequiredDescription
displayNamestringYesThe team name
externalIdstring or nullNoThe id the identity provider uses for the record
idstring or nullNoThe gateway id of the record
membersarray of SCIMMember or nullNoThe people on the team
metaobject or nullNoRecord metadata such as resourceType, created and lastModified
schemasarray of stringYesThe SCIM schema URIs the record follows

Example request:

curl -X PUT "http://localhost:4000/scim/v2/Groups/group_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Platform",
"members": [
{
"value": "jane@example.com"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
]
}'

Responses:

StatusDescriptionBody
200The team after the replacementapplication/json SCIMGroup
400A member does not exist or is outside this token's organization
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
404No group with this id that the token may see
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
displayNamestringYesThe team name
externalIdstring or nullNoThe id the identity provider uses for the record
idstring or nullNoThe gateway id of the record
membersarray of SCIMMember or nullNoThe people on the team
metaobject or nullNoRecord metadata such as resourceType, created and lastModified
schemasarray of stringYesThe SCIM schema URIs the record follows

PATCH /scim/v2/Groups/{group_id}​

Patch a SCIM group's name or members

Adds or removes team members, or renames the team, using SCIM PATCH operations, which is how most identity providers push group membership changes. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.

Parameters:

NameInTypeRequiredDescription
group_idpathstringYes
featurequerystring or nullNo

Request body (application/json, schema SCIMPatchOp):

FieldTypeRequiredDescription
Operationsarray of SCIMPatchOperationYesThe changes to apply, in order
schemasarray of stringNoAlways the SCIM PatchOp schema

Example request:

curl -X PATCH "http://localhost:4000/scim/v2/Groups/group_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Operations": [
{
"op": "add",
"path": "members",
"value": [
{
"value": "jane@example.com"
}
]
}
],
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}'

Responses:

StatusDescriptionBody
200The team after the operationsapplication/json SCIMGroup
400An operation is not supported, or a member is outside this token's organization
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
404No group with this id that the token may see
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
displayNamestringYesThe team name
externalIdstring or nullNoThe id the identity provider uses for the record
idstring or nullNoThe gateway id of the record
membersarray of SCIMMember or nullNoThe people on the team
metaobject or nullNoRecord metadata such as resourceType, created and lastModified
schemasarray of stringYesThe SCIM schema URIs the record follows

DELETE /scim/v2/Groups/{group_id}​

Delete a SCIM group and its team

Deletes the team behind a group when the group is removed in the identity provider. The team's members stay as users. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.

Parameters:

NameInTypeRequiredDescription
group_idpathstringYes
featurequerystring or nullNo

Example request:

curl -X DELETE "http://localhost:4000/scim/v2/Groups/group_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
204The team is deleted
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
404No group with this id that the token may see
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

GET /scim/v2/ResourceTypes​

List the SCIM resource types

Lists the kinds of records an identity provider can manage here, users and groups, with the address and schema of each. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/ResourceTypes" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The User and Group resource types this gateway servesapplication/json SCIMResourceTypeList
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
Resourcesarray of SCIMResourceTypeDocumentYesThe resource types
schemasarray of stringYesAlways the SCIM ListResponse schema
totalResultsintegerYesHow many resource types there are

GET /scim/v2/ResourceTypes/{resource_type_id}​

Read one SCIM resource type

Returns one kind of record an identity provider can manage here, User or Group, with its address and schema. Answers 404 for any other id. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
resource_type_idpathstringYes
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/ResourceTypes/resource_type_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The resource typeapplication/json SCIMResourceTypeDocument
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
404No resource type with this id
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
descriptionstring or nullNoWhat the resource type holds
endpointstringYesThe path its records live under
idstringYesThe resource type id, User or Group
metaobject or nullNoRecord metadata such as resourceType and location
namestringYesThe resource type name
schemastringYesThe URI of the core schema this type uses
schemasarray of stringYesAlways the SCIM ResourceType schema

GET /scim/v2/Schemas​

List the SCIM schemas

Lists the field definitions of users and groups, so an identity provider knows which attributes it may send. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/Schemas" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The User and Group schemas with their attributesapplication/json SCIMSchemaList
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
Resourcesarray of SCIMSchemaYesThe schemas
schemasarray of stringYesAlways the SCIM ListResponse schema
totalResultsintegerYesHow many schemas there are

GET /scim/v2/Schemas/{schema_id}​

Read one SCIM schema

Returns the field definitions of one schema, given its URI, such as urn:ietf:params:scim:schemas:core:2.0:User. Answers 404 for an unknown URI. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
schema_idpathstringYes
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/Schemas/schema_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The schema with its attributesapplication/json SCIMSchema
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
404No schema with this URI
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
attributesarray of SCIMSchemaAttributeNoThe attributes of the schema
descriptionstring or nullNoWhat the schema describes
idstringYesThe schema URI
metaobject or nullNoRecord metadata such as resourceType and location
namestringYesThe schema name
schemasarray of stringNoAlways the SCIM Schema schema

GET /scim/v2/ServiceProviderConfig​

Describe what this SCIM service supports

Tells an identity provider which optional SCIM features this gateway supports. PATCH and equality filters (userName and emails.value on users, displayName on groups, up to 100 results) are supported, while bulk changes, sorting, password changes and ETags are not. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/ServiceProviderConfig" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The SCIM features this gateway supportsapplication/json SCIMServiceProviderConfig
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
authenticationSchemesarray of object or nullNoHow identity providers authenticate, a bearer SCIM token
bulkSCIMFeatureNoWhether bulk requests are supported
changePasswordSCIMFeatureNoWhether password changes are supported
etagSCIMFeatureNoWhether ETags are supported
filterSCIMFeatureNoWhether list filters are advertised
metaobject or nullNoRecord metadata such as resourceType and location
patchSCIMFeatureNoWhether PATCH requests are supported
schemasarray of stringNoAlways the SCIM ServiceProviderConfig schema
sortSCIMFeatureNoWhether sorting is supported

GET /scim/v2/Users​

List or filter SCIM users

Lists the gateway users an identity provider manages, one page at a time with startIndex and count (at most 100). An identity provider sends a filter such as userName eq "jane@example.com" to check whether a person already exists before creating them. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
startIndexqueryintegerNo
countqueryintegerNo
filterquerystring or nullNo
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/Users" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200One page of users, filtered by userName when a filter is givenapplication/json SCIMListResponse
400The filter uses an attribute or operator the gateway does not support (scimType invalidFilter). Only userName eq "<value>" and emails.value eq "<value>" are supported
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
Resourcesarray of SCIMUser-Output or array of SCIMGroupYesThe records on this page
itemsPerPageinteger or nullNoHow many records this page holds
schemasarray of stringNoAlways the SCIM ListResponse schema
startIndexinteger or nullNoThe position of the first record on this page, counting from 1
totalResultsintegerYesHow many records match in all

POST /scim/v2/Users​

Create a SCIM user

Creates a gateway user when someone is assigned to the gateway in the identity provider, and adds them to the teams named in groups. Members of the group named by the scim_admin_group setting get the admin role, everyone else the default SCIM role. Answers 409 when a user with that userName already exists, which tells the identity provider to link the existing user instead. When the email already belongs to a gateway account, a deployment-wide token links the request to that account, updates it and answers 201 with its existing id, while an organization token gets 409. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.

Parameters:

NameInTypeRequiredDescription
featurequerystring or nullNo

Request body (application/json, schema SCIMUser-Input):

FieldTypeRequiredDescription
activebooleanNoFalse blocks every key of the user, true lets them call models again
displayNamestring or nullNoThe name to show for the person
emailsarray of SCIMUserEmail or nullNoThe person's email addresses
entitlementsarray of SCIMMultiValuedAttribute or nullNoEntitlements the identity provider assigns, kept with the user
externalIdstring or nullNoThe id the identity provider uses for the record
groupsarray of SCIMUserGroup or nullNoThe teams the person belongs to
idstring or nullNoThe gateway id of the record
metaobject or nullNoRecord metadata such as resourceType, created and lastModified
nameSCIMUserName or nullNoThe person's name parts
rolesarray of SCIMMultiValuedAttribute or nullNoRoles the identity provider assigns, kept with the user
schemasarray of stringYesThe SCIM schema URIs the record follows
urn:ietf:params:scim:schemas:extension:enterprise:2.0:UserSCIMEnterpriseUser or nullNoEnterprise attributes such as department and manager
userNamestring or nullNoThe sign-in name, usually the email address, used as the gateway user id

Example request:

curl -X POST "http://localhost:4000/scim/v2/Users" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"active": true,
"emails": [
{
"primary": true,
"value": "jane@example.com"
}
],
"groups": [
{
"display": "Platform",
"value": "team-platform"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"userName": "jane@example.com"
}'

Responses:

StatusDescriptionBody
201The created user, a member of the groups it namedapplication/json SCIMUser-Output
400The email or identifier is not acceptable for this token's organization
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
409A user with this userName already exists, or an organization token sent an email another account uses
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

GET /scim/v2/Users/{user_id}​

Read one SCIM user

Returns one user with their email, active flag and the teams they belong to as groups. Answers 404 when no user with that id is visible to the token. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
user_idpathstringYes
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/Users/user_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The userapplication/json SCIMUser-Output
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
404No user with this id that the token may see
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

PUT /scim/v2/Users/{user_id}​

Replace a SCIM user

Replaces a user's details with what the identity provider sends, including the teams they belong to. Setting active to false blocks every virtual key of the user so they can no longer call models, and setting it back to true unblocks them. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.

Parameters:

NameInTypeRequiredDescription
user_idpathstringYes
featurequerystring or nullNo

Request body (application/json, schema SCIMUser-Input):

FieldTypeRequiredDescription
activebooleanNoFalse blocks every key of the user, true lets them call models again
displayNamestring or nullNoThe name to show for the person
emailsarray of SCIMUserEmail or nullNoThe person's email addresses
entitlementsarray of SCIMMultiValuedAttribute or nullNoEntitlements the identity provider assigns, kept with the user
externalIdstring or nullNoThe id the identity provider uses for the record
groupsarray of SCIMUserGroup or nullNoThe teams the person belongs to
idstring or nullNoThe gateway id of the record
metaobject or nullNoRecord metadata such as resourceType, created and lastModified
nameSCIMUserName or nullNoThe person's name parts
rolesarray of SCIMMultiValuedAttribute or nullNoRoles the identity provider assigns, kept with the user
schemasarray of stringYesThe SCIM schema URIs the record follows
urn:ietf:params:scim:schemas:extension:enterprise:2.0:UserSCIMEnterpriseUser or nullNoEnterprise attributes such as department and manager
userNamestring or nullNoThe sign-in name, usually the email address, used as the gateway user id

Example request:

curl -X PUT "http://localhost:4000/scim/v2/Users/user_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"active": false,
"emails": [
{
"primary": true,
"value": "jane@example.com"
}
],
"groups": [
{
"display": "Platform",
"value": "team-platform"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"userName": "jane@example.com"
}'

Responses:

StatusDescriptionBody
200The user after the replacementapplication/json SCIMUser-Output
400The email or identifier is not acceptable for this token's organization
401The bearer token is not a SCIM token
403The token's organization does not own this account
404No user with this id that the token may see
409The new email or identifier belongs to another account
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

PATCH /scim/v2/Users/{user_id}​

Patch a SCIM user

Changes part of a user, for example only the active flag or the email, using SCIM PATCH operations. Setting active to false blocks every virtual key of the user. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.

Parameters:

NameInTypeRequiredDescription
user_idpathstringYes
featurequerystring or nullNo

Request body (application/json, schema SCIMPatchOp):

FieldTypeRequiredDescription
Operationsarray of SCIMPatchOperationYesThe changes to apply, in order
schemasarray of stringNoAlways the SCIM PatchOp schema

Example request:

curl -X PATCH "http://localhost:4000/scim/v2/Users/user_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Operations": [
{
"op": "replace",
"path": "active",
"value": false
}
],
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}'

Responses:

StatusDescriptionBody
200The user after the operationsapplication/json SCIMUser-Output
400An operation is not supported, or a value is not acceptable for this token
401The bearer token is not a SCIM token
403The token's organization does not own this account
404No user with this id that the token may see
409A patched identifier already names another account
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

DELETE /scim/v2/Users/{user_id}​

Delete a SCIM user

Removes a user when they are unassigned or deleted in the identity provider. Their virtual keys are blocked, they are taken off every team and the user is deleted. An organization token that does not own the account only removes the user from its organization. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.

Parameters:

NameInTypeRequiredDescription
user_idpathstringYes
featurequerystring or nullNo

Example request:

curl -X DELETE "http://localhost:4000/scim/v2/Users/user_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
204Deleted, or only removed from the organization when the token does not own the account
401The bearer token is not a SCIM token
403Needs an enterprise license, and organization_sso for an organization token
404No user with this id that the token may see
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

GET /scim/v2/placeholders​

List placeholder users that shadow real accounts

Lists user rows that block a real account from being synced. An earlier release created a user keyed by the raw group member value when it could not match it, and that row now shadows the account the value really names, so every push of that member is refused. Fold each one into the account it shadows with the merge route. A row with its own SSO identity or virtual keys is left out, because someone uses that account. Needs a deployment-wide SCIM token. Nothing is changed.

Parameters:

NameInTypeRequiredDescription
featurequerystring or nullNo

Example request:

curl -X GET "http://localhost:4000/scim/v2/placeholders" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The placeholder rows with the account each one shadows and the teams it holdsapplication/json array of SCIMPlaceholder
401The bearer token is not a SCIM token
403Placeholder repair needs a deployment-wide SCIM token
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

POST /scim/v2/placeholders/{user_id}/merge​

Merge a placeholder user into the account it shadows

Folds a placeholder user into the one account its id names by SSO identity or email. The account is added to every team the placeholder is on, then the placeholder is deleted the way the delete user route deletes a user, so the next group push resolves to the real account. Refused with 409 when the row has its own SSO identity, owns virtual keys, or names no account or several. Needs a deployment-wide SCIM token.

Parameters:

NameInTypeRequiredDescription
user_idpathstringYes
featurequerystring or nullNo

Request body (application/json, object):

Example request:

curl -X POST "http://localhost:4000/scim/v2/placeholders/user_id-123/merge" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'

Responses:

StatusDescriptionBody
200The account joined the placeholder's teams and the placeholder is deletedapplication/json SCIMPlaceholderMergeResult
401The bearer token is not a SCIM token
403Placeholder repair needs a deployment-wide SCIM token
404No placeholder with this id
409The row has its own SSO identity, owns virtual keys, or names no account
422Validation Errorapplication/json HTTPValidationError
500The gateway runs without a database, or could not create a group member it had to provision

Response fields (200):

FieldTypeRequiredDescription
merged_into_user_idstringYesThe account it was folded into
placeholder_user_idstringYesThe placeholder user that was folded in and deleted
team_idsarray of stringYesThe teams that account joined