Api::V1::UsersController API

Users

Generate new SMS code

PATCH /api/v1/users/:id/code

Parameters

Name Description
id id
user[phone] Phone
code[action] regenerate

Request

Headers

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

Route

PATCH /api/v1/users/184/code

Body

{"user":{"phone":"+33600000181"},"code":{"action":"regenerate"}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE
Access-Control-Allow-Headers: Origin,Accept,Content-Type,X-Requested-With,X-CSRF-Token,X-API-KEY
Content-Type: application/json; charset=utf-8
ETag: W/"ab0ced622d378f3a1a629883fd9ea3db"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 750c9bfc-7cff-46ec-86b7-b47c320d3ff6
X-Runtime: 0.018362
Content-Length: 33

Status

200 OK

Body

{
  "user": {
    "phone": "+33600000181"
  }
}