Înregistrare
Inregistreaza un utilizator nou cu privilegii user.
Endpoint
http
POST /api/v1/registerParametri
Parametri body
| Parametru | Tip | Obligatoriu | Descriere |
|---|---|---|---|
name | string | yes | Numele utilizatorului. |
email | string | yes | Adresa de email a utilizatorului. |
password | string | yes | Parola utilizatorului. |
password_confirmation | string | yes | Confirmarea parolei utilizatorului. |
Exemplu de cerere
sh
curl --location --request POST 'https://files.ro/api/v1/register' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Jane Doe",
"email": "jane@doe.com",
"password": "filesro",
"password_confirmation": "filesro"
}'Răspuns
json
{
"type": "success",
"message": "User successfully registered."
}json
{
"type": "error",
"message": "User registration is not allowed"
}json
{
"type": "error",
"message": "User registrations are temporarily disabled"
}json
{
"message": "The given data was invalid.",
"errors": {
"field": [
"The field is required."
]
}
}