Skip to content

Delete User

DELETE
/api/users/{user_id}
curl --request DELETE \
--url https://example.com/api/users/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Delete user (superuser only).

Tombstones the critical-DB shadow row BEFORE deleting the main row — this ordering is deliberate: a failure at the tombstone step leaves a live main user + a live critical row (safe, retryable), whereas deleting the main row first would orphan the critical row with no way back to the identity that owns it. Refuses (409) if the user has a live subscription — deleting an account still being billed is a billing footgun, not a routine admin action.

user_id
required
User Id
string format: uuid

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}