REST APIMembers
Change a member's role.
Applies to their sessions and keys on their next request. The last admin who can sign in stays an admin (409 `last_admin`).
PATCH
Applies to their sessions and keys on their next request. The last admin who can sign in stays an admin (409 last_admin).
header
AuthorizationBearer <token>A Sluby API key (sluby_...) sent as Authorization: Bearer <key>. Keys carry scopes: upload, read, manage.
id*stringMember id.
application/json- body
role*stringValue in
"admin""member"The member with the new role.
application/json- response
id*stringFormat
uuidname*stringrole*stringValue in
"admin""member"status*stringremoved: an admin removed the member, who cannot sign in and whose keys stop until they are restored.
Value in
"active""removed"sign_in*array<>created_at*stringFormat
date-timelast_sign_in_at*|The latest sign-in by any method, null when the member has none.
Format
date-timecurl -X PATCH 'https://sluby.example.com/api/v1/members/string' \ -H 'Content-Type: application/json' \ -d '{ "role": "admin"}'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "role": "admin", "status": "active", "sign_in": [ { "provider": "string", "username": "string" } ], "created_at": "2019-08-24T14:15:22Z", "last_sign_in_at": "2019-08-24T14:15:22Z"}