Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CristianRR94/springCommunity/llms.txt

Use this file to discover all available pages before exploring further.

The Delete User endpoint permanently removes the authenticated user’s account from Spring Community. This is a destructive, irreversible operation: the Usuario record, the linked Participante profile, all JWT tokens issued to the account, and any associated data (such as event memberships) are all deleted in a single cascaded database operation via CuentaService.deleteUsuarioParticipante(). The caller is identified exclusively from the JWT access token — no ID, path variable, or request body is needed.

Endpoint

DELETE /api/usuarios/delete
Access: A valid JWT access token must be supplied in the Authorization header. Although /api/usuarios/** is listed as permitAll() in the security configuration, the endpoint logic calls AuthDataService.obtenerUsuarioAutenticado() to resolve the user ID from the authentication context and will fail if no valid principal is present.

Headers

Authorization
string
required
A valid JWT access token obtained from the authentication endpoint. Must follow the Bearer <accessToken> scheme. The user ID is extracted server-side from the token via AuthDataService.obtenerUsuarioAutenticado().Example: Bearer eyJhbGciOiJIUzI1NiJ9...

Request parameters

This endpoint accepts no path parameters, query parameters, or request body. The account to be deleted is derived entirely from the authenticated principal encoded in the token.

Response

Returns 200 OK with an empty response body on success.

Error responses

HTTP statusCondition
401 UnauthorizedThe Authorization header is missing, the token has expired, or the token signature is invalid.

Example error response body

{
  "status": 401,
  "mensaje": "Token inválido",
  "timestamp": 1717000000000
}

Example request

curl -X DELETE https://api.springcommunity.example/api/usuarios/delete \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiJ9..."

This action is permanent. Calling this endpoint deletes the user account, their participant profile, all issued JWT tokens, and all associated data including event memberships. There is no recovery mechanism — once deleted, the account and its data cannot be restored.

Build docs developers (and LLMs) love