Skip to content

Registration

Register new user with privileges as user.

Endpoint

http
POST /api/v1/register

Parameters

Body parameters

ParameterTypeRequiredDescription
namestringyesThe name of the user.
emailstringyesThe email address of the user.
passwordstringyesThe user password.
password_confirmationstringyesThe user password confirmation.

Request example

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"
}'

Response

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."
    ]
  }
}