Users

Create a new user. It creates new user and sends an email or SMS (depends on login type) with a pin code.

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", "admin"]

Request

Route

POST /api/v1/users

Headers

Accept: application/json
Content-Type: application/json
Host: example.org
Cookie: 

Body

{
  "user": {
    "login": "rea.rogahn@keebler.example",
    "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/"a032fe46148bb31dbc4ddd6f06a21c1e"
cache-control: max-age=0, private, must-revalidate
x-request-id: 61f2c105-081d-408b-9a73-f1adea3ad866
x-runtime: 0.024234
content-length: 211

Body

{
  "user": {
    "id": 1867,
    "company": null,
    "contact_phone_number": null,
    "email": "rea.rogahn@keebler.example",
    "first_name": null,
    "job_position": null,
    "last_name": null,
    "phone_number": null,
    "profile_id": null,
    "role": "operator"
  }
}