---
updatedAt: 2025-11-06T16:49:07.000Z
agentTools:
  projectIndex: https://developer.peakon.com/llms.txt
---

# Patch user

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "SCIM 2.0 API",
    "description": "The Peakon SCIM 2.0 API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://{subdomain}.peakon.com/api/scim/v2",
      "variables": {
        "subdomain": {
          "description": "Unique subdomain assigned to your Peakon instance.",
          "default": "api"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Users"
    }
  ],
  "paths": {
    "/Users/{id}": {
      "patch": {
        "tags": [
          "Users"
        ],
        "summary": "Patch user",
        "operationId": "patchUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "patch operations list",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UserPatch"
              }
            },
            "application/scim+json": {
              "schema": {
                "$ref": "#/components/schemas/UserPatch"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "successfully partially updated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              },
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/UserResponse"
                }
              }
            }
          },
          "400": {
            "description": "bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "authorization failure",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "permissions denied",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "duplicate email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              },
              "application/scim+json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "body"
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "country": {
            "type": "string"
          },
          "locality": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "streetAddress": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "work"
            ]
          }
        }
      },
      "Email": {
        "required": [
          "type",
          "value"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "work"
            ]
          },
          "value": {
            "type": "string"
          }
        }
      },
      "EnterpriseUser": {
        "type": "object",
        "properties": {
          "department": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "detail": {
            "type": "string",
            "description": "detail error message"
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "urn:ietf:params:scim:api:messages:2.0:Error"
              ]
            }
          },
          "scimType": {
            "type": "string",
            "description": "bad request type when status code is 400",
            "enum": [
              "uniqueness",
              "tooMany",
              "mutability",
              "sensitive",
              "invalidSyntax",
              "invalidFilter",
              "invalidPath",
              "invalidValue",
              "invalidVers",
              "noTarget"
            ]
          },
          "status": {
            "type": "string",
            "description": "same as HTTP status code, e.g. 400, 401, etc."
          }
        }
      },
      "Meta": {
        "type": "object",
        "properties": {
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time"
          },
          "location": {
            "type": "string",
            "description": "resource location URI"
          },
          "resourceType": {
            "type": "string",
            "enum": [
              "User",
              "Group"
            ]
          }
        },
        "description": "resource metadata"
      },
      "Name": {
        "required": [
          "familyName",
          "givenName"
        ],
        "type": "object",
        "properties": {
          "familyName": {
            "type": "string"
          },
          "givenName": {
            "type": "string"
          }
        }
      },
      "PatchOperation": {
        "required": [
          "op"
        ],
        "type": "object",
        "properties": {
          "op": {
            "type": "string",
            "enum": [
              "add",
              "replace",
              "remove"
            ]
          },
          "path": {
            "type": "string"
          },
          "value": {
            "type": "object",
            "properties": {},
            "description": "corresponding 'value' of that field specified by 'path'"
          }
        }
      },
      "PhoneNumber": {
        "required": [
          "type",
          "value"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "work",
              "mobile",
              "other"
            ]
          },
          "value": {
            "type": "string"
          }
        }
      },
      "Photo": {
        "required": [
          "type",
          "value"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "photo"
            ]
          },
          "value": {
            "type": "string"
          }
        }
      },
      "User": {
        "required": [
          "emails",
          "name",
          "schemas",
          "userName"
        ],
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean",
            "description": "user status",
            "default": false
          },
          "addresses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Address"
            }
          },
          "emails": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Email"
            }
          },
          "externalId": {
            "type": "string",
            "description": "external unique resource id defined by provisioning client"
          },
          "id": {
            "type": "string",
            "description": "unique resource id"
          },
          "name": {
            "$ref": "#/components/schemas/Name"
          },
          "phoneNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PhoneNumber"
            }
          },
          "photos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Photo"
            }
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "urn:ietf:params:scim:schemas:core:2.0:User"
              ]
            }
          },
          "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
            "$ref": "#/components/schemas/EnterpriseUser"
          },
          "userName": {
            "type": "string",
            "description": "MUST be same as work type email address"
          }
        }
      },
      "UserPatch": {
        "required": [
          "Operations",
          "schemas"
        ],
        "type": "object",
        "properties": {
          "Operations": {
            "type": "array",
            "description": "patch operations list",
            "items": {
              "$ref": "#/components/schemas/PatchOperation"
            }
          },
          "schemas": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "urn:ietf:params:scim:api:messages:2.0:PatchOp"
              ]
            }
          }
        }
      },
      "UserResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/User"
          },
          {
            "type": "object",
            "properties": {
              "meta": {
                "$ref": "#/components/schemas/Meta"
              }
            }
          }
        ]
      }
    }
  }
}
```