Skip to content

Delete User

DELETE
/api/v1/users/{sub}
curl --request DELETE \
--url https://api.spartanauth.com/api/v1/users/example

Deletes a user by their unique sub. Requires the caller to be an admin of the user’s sector or the default sector, or the user themselves. This action is irreversible, it deletes all personally identifiable information and leaves a digital ‘tomb stone’ of the user id. Allows other parts of the system such as immutable audit logs to remain as is for forensic reconstruction.

sub
required
string
profile.sub
string
profile.name
string
profile.givenName
string
profile.familyName
string
profile.middleName
string
profile.nickname
string
profile.preferredUsername
string
profile.profile
string
profile.picture
string
profile.website
string
profile.email
string
profile.emailVerified
boolean
profile.gender
string
profile.birthdate
string
profile.zoneinfo
string
profile.locale
string
profile.phoneNumber
string
profile.phoneNumberVerified
boolean
profile.address.formatted
string
profile.address.streetAddress
string
profile.address.locality
string
profile.address.region
string
profile.address.postalCode
string
profile.address.country
string
profile.updatedAt
string format: int64
profile.createdAt
string format: int64
sectorID
string
isAdmin
boolean

The desired admin state (only applied when set_admin_explicitly = true)

setAdminExplicitly
boolean

Must be true for is_admin to be applied — prevents default false from overwriting

A successful response.

Media type application/json
object
sub
string
username
string
sectorID
string
Example generated
{
"sub": "example",
"username": "example",
"sectorID": "example"
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}