move user delete to api endpoint

This commit is contained in:
Gregor Vostrak
2026-05-27 18:56:57 +02:00
committed by Constantin Graf
parent fe4e903203
commit d0334bd730
4 changed files with 141 additions and 27 deletions

View File

@@ -4534,6 +4534,45 @@ The report is considered public if the `is_public` field is set to &#x
},
],
},
{
method: 'delete',
path: '/v1/users/:user',
alias: 'deleteUser',
description: `This endpoint is independent of the organization.`,
requestFormat: 'json',
parameters: [
{
name: 'user',
type: 'Path',
schema: z.string(),
},
],
response: z.void(),
errors: [
{
status: 400,
description: `API exception`,
schema: z
.object({ error: z.boolean(), key: z.string(), message: z.string() })
.passthrough(),
},
{
status: 401,
description: `Unauthenticated`,
schema: z.object({ message: z.string() }).passthrough(),
},
{
status: 403,
description: `Authorization error`,
schema: z.object({ message: z.string() }).passthrough(),
},
{
status: 404,
description: `Not found`,
schema: z.object({ message: z.string() }).passthrough(),
},
],
},
{
method: 'post',
path: '/v1/users/:user/resend-email-verification',