The register endpoint creates a new user account in Smart Enviro Backend. On success, it returns aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/GaelCeballos/Smart_Enviro_Backend/llms.txt
Use this file to discover all available pages before exploring further.
201 Created response without issuing a token — clients must call POST /api/login separately to obtain a bearer token and begin an authenticated session.
Endpoint
| Field | Value |
|---|---|
| Method | POST |
| Path | /api/register |
| Auth required | No |
Request Body
Display name for the user. Maximum 255 characters.
Must be a valid email address and unique across all existing user accounts. Registration fails with
422 if the email is already taken.Account password. Minimum 8 characters. Stored as a bcrypt hash — the plain-text value is never persisted.
Must exactly match the value provided in
password. Used by Laravel’s confirmed validation rule.Request Example
Responses
201 Created — Registration successful
The user record was created successfully. No token is issued.Always
"success" on a 201 response.Human-readable confirmation message (
"Registro exitoso").422 Unprocessable Entity — Validation error
Returned when any field fails validation. Common causes:emailis already registered to an existing accountpasswordandpassword_confirmationdo not matchpasswordis shorter than 8 characters- A required field is missing or empty
errors object keyed by field name, e.g.:
After registering, call
POST /api/login with the same email and password to receive a bearer token. Registration alone does not create a session.