# Delete user

Canonical page: https://docs.ovok.com/api/slim/user/delete-user

`DELETE /v1/slim/user/{profileType}/{profileId}`

Removes a practitioner from a project: deletes their membership and practitioner profile, and their user account when this was their last membership. Use it to offboard a team member.

**Auth:** Bearer token for a practitioner, project admin or System Owner session. The caller's access policy must grant `Practitioner:delete` (a project admin who holds no access policy skips this check).
**Scope:** The practitioner's project must be the caller's project (from the token) or a direct child of it.

## Behaviour

- `profileType` must be `Practitioner` and `profileId` a UUID.
- The membership, the practitioner and, when it has no other membership, the user are deleted together or not at all.
- The owner of the caller's own project cannot be deleted. The owner of a child project can.
- After the delete, an account-deletion email is sent to the user's email address, if they have one. A failed email does not fail the request.
- Returns `{ "success": true }`.


## Example

```bash
curl -X DELETE 'https://api.sandbox.ovok.com/v1/slim/user/Practitioner/c3499c27-2973-0a7f-807e-fb8676a92dcb' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'
```
