Skip to content

Înregistrare

Inregistreaza un utilizator nou cu privilegii user.

Endpoint

http
POST /api/v1/register

Parametri

Parametri body

ParametruTipObligatoriuDescriere
namestringyesNumele utilizatorului.
emailstringyesAdresa de email a utilizatorului.
passwordstringyesParola utilizatorului.
password_confirmationstringyesConfirmarea 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."
    ]
  }
}