Skip to content
Skip to Content
Coder Docs

SCIM 2.0: Update user account

PATCH
/scim/v2/Users/{id}

Authorization

Authorization
headerAuthorization<token>

Path Parameters

id*string

User ID

Formatuuid

Request Body

Update user request

application/json
  1. body
active?boolean

Active is a ptr to prevent the empty value from being interpreted as false.

emails?array<>
groups?array<unknown>
id?string
meta?
name?
schemas?array<string>
userName?string

Response Body

OK

application/scim+json
  1. response
avatar_url?string
Formaturi
created_at*string
Formatdate-time
email*string
Formatemail
has_ai_seat?boolean

HasAISeat intentionally omits omitempty so the API always includes the field, even when false.

id*string
Formatuuid
is_service_account?boolean
last_seen_at?string
Formatdate-time
login_type?codersdk.LoginType
Value in"""password""github""oidc""token""none"
name?string
organization_ids?array<>
roles?array<>
status?string
Value in"active""suspended"
theme_preference?string

Deprecated: this value should be retrieved from codersdk.UserPreferenceSettings instead.

updated_at?string
Formatdate-time
username*string

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X PATCH \	"$CODER_URL/scim/v2/Users/{id}" \	-H "Authorization: {Authorization}" \	-H "Content-Type: application/json" \	-d '{  "active": true,  "emails": [    {      "display": "string",      "primary": true,      "type": "string",      "value": "[email protected]"    }  ],  "groups": [    null  ]}'
Example Response200
{  "avatar_url": "http://example.com",  "created_at": "2019-08-24T14:15:22Z",  "email": "[email protected]",  "has_ai_seat": true,  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "is_service_account": true,  "last_seen_at": "2019-08-24T14:15:22Z",  "login_type": "",  "name": "string",  "organization_ids": [    "7d4232d7-54a0-4c93-9c1e-a8fd2dfcdabe"  ],  "roles": [    {      "display_name": "string",      "name": "string",      "organization_id": "string"    }  ],  "status": "active",  "theme_preference": "string",  "updated_at": "2019-08-24T14:15:22Z",  "username": "string"}