Change the role of a staff account (admin/staff only; not owner; not self)
PATCH
/admin/v1/users/{id}/role
const url = 'https://your-store.example.com/admin/v1/users/example/role';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"role":"admin"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://your-store.example.com/admin/v1/users/example/role \ --header 'Content-Type: application/json' \ --data '{ "role": "admin" }'Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
role
required
string