Delete user
DELETE
/api/server/v1/users/{userId}
const url = 'https://api.torii.so/api/server/v1/users/01931a73-8b00-7000-8000-000000000000';const options = {method: 'DELETE'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.torii.so/api/server/v1/users/01931a73-8b00-7000-8000-000000000000Soft-deletes the user. Not idempotent at the HTTP layer: the authorization grant for the user is revoked on the first successful delete, so a subsequent DELETE for the same id returns 403 rather than 204. Treat 403 from a retry as a confirmation that the user is already deleted.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” userId
required
string format: uuid
Identifier of the user to delete.
Example
01931a73-8b00-7000-8000-000000000000Responses
Section titled “ Responses ”User deleted.
Missing or invalid secret key.
Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}User belongs to a different environment.
Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}No user with this id.
Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{ "type": "https://example.com", "title": "example", "status": 1, "detail": "example", "instance": "https://example.com", "properties": { "additionalProperty": "example" }}