---
updatedAt: 2025-11-26T11:26:15.000Z
agentTools:
  projectIndex: https://developer.peakon.com/llms.txt
---

# Delete user

> 📘 Deleting Users
>
> Deleting users can have detrimental effects in Peakon. When an employee is deleted, there are a number of cascading effects in the system (responses being closed, actions/priorities etc being deleted), and it is virtually impossible to restore that data. The same is true if someone deletes  the employee in the UI.
>
> Instead of deleting users, we would strongly recommend setting a separation date to mark the employee as a leaver. The delete operation should only be used in the rare ocasssion where you want to delete the entire record completely from the Peakon system.

# 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}": {
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete user",
        "operationId": "deleteUser",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "user id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "successfully deleted",
            "content": {}
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "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."
          }
        }
      }
    }
  }
}
```