Create a new user. It creates new user and sends an email or SMS (depends on login type) with a pin code.
Users
POST sign up(referral)
Endpoint
POST /api/v1/users
Parameters
Name | Description | Enum |
---|---|---|
user[login] required | Email or Phone number | |
user[role] required | User role | ["driver", "operator", "admin"] |
Request
Route
POST /api/v1/users
Headers
Accept: application/json
Content-Type: application/json
Host: example.org
Cookie:
Body
{
"user": {
"login": "adolph_halvorson@little-wisoky.example",
"role": "driver",
"referral_code": "802182"
}
}
Response
Simulated Response
Status
200
Headers
x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"a661de5e320bb308285a63203cde8c5e"
cache-control: max-age=0, private, must-revalidate
x-request-id: 8a983d2f-b1f1-462e-a420-0794dfad1c4f
x-runtime: 0.021008
content-length: 183
Body
{
"user": {
"id": 1838,
"email": "adolph_halvorson@little-wisoky.example",
"first_name": null,
"last_name": null,
"phone_number": null,
"profile_id": null,
"referral_code": "598525",
"role": "driver"
}
}