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/1929
Headers
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxOTI5Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzUzMjY2MjMxLCJleHAiOjE3NTU4NTgyMzEsImp0aSI6IjdiNDZkM2U1LWQ5ODctNDMyMy04YmQ1LWY3Njk3ODRjNDVmYSJ9.bFi8g1KYXgydJkBKPU8aGglr3dLUvODFHllHc-NJ7v0
Host: example.org
Cookie:
Body
{
"user": {
"first_name": "Updated",
"last_name": "Runolfsson"
}
}
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/"54b90add228cf6794f08b6a48c72ce20"
cache-control: max-age=0, private, must-revalidate
x-request-id: 0aceb857-9627-46b3-ab90-271373f43271
x-runtime: 0.015963
content-length: 167
Body
{
"user": {
"id": 1929,
"email": "shanelle.bogisich+admin@example.com",
"first_name": "Updated",
"last_name": "Runolfsson",
"phone_number": null,
"profile_id": null,
"role": "admin"
}
}