GoodMemGoodMem
ReferenceAPIREST APIUsers

Update a human user

Updates only fields present in the request. Empty username or displayName values clear those optional fields. Updating a deleted user fails with 412.

PUT
/v1/users/{id}
x-api-key<token>

In: header

Path Parameters

idstring

User UUID

emailstring | null

Replacement email. A present empty value is invalid.

Length1 <= length <= 255
usernamestring | null

Replacement username. An empty string clears the username.

Example"new-username"
Lengthlength <= 100
displayNamestring | null

Replacement display name. An empty string clears the display name.

Example"Avery Person"
Lengthlength <= 255
replaceLabelsobject | null

Complete replacement label map; an empty map clears all labels and is mutually exclusive with mergeLabels. At most 20 entries; keys and values contain at most 255 characters; keys use [a-z0-9._-].

Example{"team":"platform"}
Propertiesproperties <= 20

Empty Object

mergeLabelsobject | null

Labels to upsert; must contain at least one entry and is mutually exclusive with replaceLabels. The final stored map may contain at most 20 entries; keys and values contain at most 255 characters; keys use [a-z0-9._-].

Example{"environment":"production"}
Properties1 <= properties <= 20

Empty Object

Response Body

curl -X PUT "https://loading/v1/users/550e8400-e29b-41d4-a716-446655440000" \  -H "Content-Type: application/json" \  -d '{    "email": "[email protected]"  }'
{
  "userId": "550e8400-e29b-41d4-a716-446655440000",
  "email": "[email protected]",
  "displayName": "John Doe",
  "username": "johndoe",
  "labels": {
    "team": "platform"
  },
  "enrollmentSummary": {
    "openEnrollmentExpiresAt": 1786752000000
  },
  "deletedAt": 1620200000000,
  "deletedById": "8ef578ad-7f1e-4656-b48b-b1b4a9aaa1cb",
  "createdAt": 1620000000000,
  "updatedAt": 1620100000000,
  "createdById": "e13e432a-5323-4484-a91d-b5969bc564d9",
  "updatedById": "d8bc6076-4141-4a88-80b9-0eb31643066f"
}
Empty
Empty
Empty
Empty
Empty
Empty
Empty
Empty