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
Endpoint
POST /api/v1/users
Parameters
| Name | Description | Enum |
|---|---|---|
| user[login] required | Email or Phone number | |
| user[role] required | User role | ["driver", "operator", "financial_admin", "admin"] |
Request
Route
POST /api/v1/users
Headers
Accept: application/json
Content-Type: application/json
Host: example.org
Cookie:
Body
{
"user": {
"login": "rudolph.feil@nader-rosenbaum.test",
"role": "operator"
}
}
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/"4775cbb73c131ed9599f9bfeca49c1b5"
cache-control: max-age=0, private, must-revalidate
x-request-id: 41a3479e-5d67-4c11-91aa-67a84bab988c
x-runtime: 0.023198
content-length: 246
Body
{
"user": {
"id": 1924,
"company": null,
"contact_phone_number": null,
"email": "rudolph.feil@nader-rosenbaum.test",
"financial_company_id": null,
"first_name": null,
"job_position": null,
"last_name": null,
"phone_number": null,
"profile_id": null,
"role": "operator"
}
}