1. auth
Dosy
  • auth
    • register
      POST
    • logout
      POST
    • get_user
      GET
    • edit-profile
      POST
    • change_password
      POST
    • login
      POST
    • delete-account
      DELETE
    • reset-password
      POST
  • home
    • get_description
      GET
    • get_how_it_works
      GET
    • get_contacts
      GET
    • get_social_links
      GET
  • awards
    • get_awards
      GET
    • get_award_details
      GET
  • media
    • get_media
      GET
    • get_media_details
      GET
  • blogs
    • get_blog
      GET
    • get_blog_details
      GET
  • packages
    • get_package_types
      GET
    • get_packages
      GET
  • Ride Requests
    • accept_ride
      POST
    • ride_request
      POST
    • update_ride
      POST
    • calculate-ride-cost
      POST
    • get_user_rides
      GET
    • get_captain_rides
      GET
    • get_rides
      GET
    • cancel-ride
      POST
    • submit-rate
      POST
  • wallet
    • withdraw_request
  • captain
    • wallet-balance
    • wallet-log
  • become_captain_request
    POST
  • sell_scooter_request
    POST
  • book_classes_request
    POST
  1. auth

register

POST
/api/v1/register

User Registration Endpoint#

Overview#

This endpoint allows new users to register an account in the system. It accepts user credentials and personal information via a multipart form data request and creates a new user account upon successful validation.

Endpoint Details#

Method: POST
URL: dosy.test/api/register
Content-Type: multipart/form-data

Request Parameters#

All parameters are sent as form-data in the request body:
ParameterTypeRequiredDescription
namestringYesThe full name of the user registering for an account
emailstringYesA valid email address for the user. Must be unique in the system
passwordstringYesThe user's desired password for account authentication
password_confirmationstringYesPassword confirmation - must exactly match the password field

Validation Rules#

Email: Must be a valid email format and unique (not already registered)
Password: Must meet minimum security requirements (length, complexity may apply)
Password Confirmation: Must exactly match the password field value
Name: Cannot be empty

Response Codes#

Success Responses#

200 OK or 201 Created: User account successfully created
Returns user details and possibly an authentication token

Error Responses#

422 Unprocessable Entity: Validation error occurred
Common causes:
Password and password_confirmation fields do not match
Email already exists in the system
Required fields are missing
Email format is invalid
Response includes detailed error messages for each failed validation
400 Bad Request: Malformed request data
500 Internal Server Error: Server-side error during registration

Example Usage#

Valid Request Example#

name: api-user
email: api-user@test.com
password: password
password_confirmation: password

Common Errors#

Password Mismatch (422 Error):
{
  "message": "The password field confirmation does not match.",
  "errors": {
    "password": ["The password field confirmation does not match."]
  }
}

Notes#

Ensure the password_confirmation value exactly matches the password value to avoid validation errors
The endpoint uses multipart/form-data encoding
Include Accept: application/json header to receive JSON responses

Request

Header Params

Body Params multipart/form-data

Responses

🟢200
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/api/v1/register' \
--header 'Accept: application/json' \
--form 'name="new-user-101"' \
--form 'phone="1551501119"' \
--form 'user_type="rider"' \
--form 'password="password"' \
--form 'password_confirmation="password"' \
--form 'country_code="+20"'
Response Response Example
{}
Modified at 2026-06-10 09:41:09
Next
logout
Built with