Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ricardomb-tech/auth-service/llms.txt

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

Submitting this endpoint creates a new account and triggers a verification email to the supplied address. The account starts in PENDING_VERIFICATION status and cannot be used to log in until the email verification step is completed. Email format validation and password-policy enforcement happen inside the domain layer — the controller only guards against blank values and oversized inputs.

POST /auth/register

Authentication: None required

Request Body

email
string
required
The email address for the new account. Must not be blank. Maximum 254 characters. Email format is validated by the domain layer.
password
string
required
The password for the new account. Must not be blank. Maximum 72 characters. Password policy (minimum length, complexity) is enforced by the domain layer.

Response — 202 Accepted

The server always returns 202 Accepted with the following body, regardless of whether the email address is already registered.
{
  "message": "Si el email es válido, recibirás un correo de verificación."
}

Error Responses

StatusCondition
400 Bad RequestA required field is blank or exceeds the maximum length. Returns application/problem+json.

curl Example

curl -s -X POST http://localhost:8080/auth/register \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "alice@example.com",
    "password": "s3cur3P@ssword!"
  }'
Anti-enumeration protection: /auth/register always returns 202 Accepted with the same message body whether the email address is already registered, whether the account is pending, or whether it is brand new. This prevents an attacker from discovering which email addresses have accounts by probing the registration endpoint. If an email already exists, the new registration attempt is silently discarded.

POST /auth/resend-verification

Resends the verification email for an account that is still in PENDING_VERIFICATION status. Useful when the original email was lost, landed in spam, or the verification token expired. Authentication: None required

Request Body

email
string
required
The email address associated with the pending account. Maximum 254 characters.

Response — 202 Accepted

{
  "message": "Si el email es válido y está pendiente de verificación, recibirás un correo con un nuevo enlace."
}

curl Example

curl -s -X POST http://localhost:8080/auth/resend-verification \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "alice@example.com"
  }'
Like /auth/register, the response is identical whether the email exists or not, and whether the account is already verified. The resend is silently skipped for non-existent or already-active accounts — anti-enumeration applies here too.

Build docs developers (and LLMs) love