Update a user(admin)
Users
PUT update admin profile
Endpoint
PUT /api/v1/users/:id
Parameters
Name | Description |
---|---|
review[first_name] required | Review first name |
review[last_name] required | Review last name |
Request
Route
PUT /api/v1/users/1908
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxOTA4Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzYwOTUwNDgxLCJleHAiOjE3NjM1NDI0ODEsImp0aSI6ImZiNWI4NzZhLWJlZWYtNDE0Mi04NWQ5LTg4NzE2MTIxOTQ3MiJ9.VjlE505bqj3mP_xEDiqzwGi5KsVO2NjJJsGjkhTxzMo
Host: example.org
Cookie:
Body
{
"user": {
"first_name": "Updated",
"last_name": "Schroeder"
}
}
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/"3021f8c4530209a6d04d232baf0eb589"
cache-control: max-age=0, private, must-revalidate
x-request-id: 5ff6673a-7222-4a48-95d0-bbdf8d9cb9ef
x-runtime: 0.011307
content-length: 162
Body
{
"user": {
"id": 1908,
"email": "malka.witting+admin@example.com",
"first_name": "Updated",
"last_name": "Schroeder",
"phone_number": null,
"profile_id": null,
"role": "admin"
}
}