Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Manuelfg1985/Proyecto_Final_26/llms.txt

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

This endpoint permanently removes an applicant document from the Firestore postulantes collection using the Firebase SDK’s deleteDoc. Once deleted, the record cannot be recovered. A valid Bearer token is required — the authMiddleware will reject unauthenticated requests before they reach the controller. If the :id path parameter is missing entirely, the server returns a 400 response before attempting any Firestore operation.
This action is irreversible. Deleting an applicant permanently removes all of their data from Firestore. There is no soft-delete or recycle bin — ensure you have confirmed the correct document ID before proceeding.

Endpoint

MethodDELETE
Path/api/postulantes/:id
AuthBearer token required

Path parameters

id
string
required
The Firestore document ID of the applicant to delete. Returns a 400 Bad Request if this parameter is missing.

Request headers

Authorization
string
required
JWT Bearer token. Format: Bearer <token>. Obtain a token from POST /api/auth/login.

Responses

200 OK

The applicant document was successfully deleted from Firestore.
{ "message": "User deleted successfully" }

400 Bad Request

Returned when the id path parameter is missing from the request.
{ "message": "El ID es requerido" }

401 Unauthorized

Returned when the Authorization header is missing or does not start with Bearer .
{ "message": "Acceso denegado. No se proporcionó un token válido." }

403 Forbidden

Returned when the token is present but invalid or expired.
{ "message": "Token inválido o expirado" }

500 Internal Server Error

Returned when the Firestore deleteDoc call fails unexpectedly.
{ "message": "Error deleting user", "error": "..." }

Example

Request

curl -X DELETE https://proyecto-final-26-6tn2.vercel.app/api/postulantes/abc123XyZ \
  -H "Authorization: Bearer <token>"

Response — 200 OK

{ "message": "User deleted successfully" }

Build docs developers (and LLMs) love