---
title: "Delete a user."
method: DELETE
path: "/users/{userId}.json"
tags: ["Users"]
---

# Delete a user.

`DELETE /users/{userId}.json`

## Request

- Base URL: `https://passbolt.local`
- URL: `https://passbolt.local/users/{userId}.json`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/passbolt/apis/passbolt-api/docs/users/:userId.json/delete.ts> (a function with typed inputs; its response is checked against the schema)

Only a user with an administrator role can delete users. A `user` can not be deleted as long as:

- They are the sole owner of a shared resource.
- They are a manager of a non empty group.

In this case you will need to transfer the ownership of the shared resources and appoint a new manager to the group in order to proceed.

## Path parameters

- `userId` string, uuid, required

## Response `200`

Operation is successful.

- object
  - `header` Header, required
    - `id` string, uuid, required
    - `status` 'success' | 'error', required
    - `servertime` integer, required
    - `action` string, uuid, required
    - `message` string, required
    - `url` string, uri, required
    - `code` integer, required
  - `body` unknown, required

## Other responses

- `400`: The deletion failed.
- `401`: Authentication required.
- `404`: Not found

## Changes

- **2026-11-06** `8d72215e2274`: 1 breaking, 7 info
  - the `body/errors/resources/sole_owner/items/anyOf[#/components/schemas/resourceV5IndexAndView]/allOf[subschema #2]/secrets/items/` response's property type changed from `string` to `object` for status `400`
  - added the optional property `body/errors/resources/sole_owner/items/anyOf[#/components/schemas/resourceV5IndexAndView]/allOf[subschema #2]/offline` to the response with the `400` status
  - added the required property `body/errors/resources/sole_owner/items/anyOf[#/components/schemas/resourceV5IndexAndView]/allOf[subschema #2]/secrets/items/created` to the response with the `400` status
  - added the required property `body/errors/resources/sole_owner/items/anyOf[#/components/schemas/resourceV5IndexAndView]/allOf[subschema #2]/secrets/items/data` to the response with the `400` status
  - …4 more
- **2025-06-25** `829cf48ab700`: 1 breaking, 1 info
  - the `body` response's property type changed from `string` to `object` for status `400`
  - added the optional property `body/errors` to the response with the `400` status

[Operation history](https://skmtc.dev/passbolt/apis/passbolt-api/changes/users/:userId.json/delete.md)

---

[API](https://skmtc.dev/passbolt/apis/passbolt-api.md) - [All operations](https://skmtc.dev/passbolt/apis/passbolt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/passbolt/apis/passbolt-api/revisions/8d72215e2274?raw)
