Change a member’s role
const url = 'https://beta-api.plune.ai/v1/members/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"role":"reader"}'};
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://beta-api.plune.ai/v1/members/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "role": "reader" }'Owner only (api.ts → setMemberRole, the role select on a row). The id is the member’s user id, as GET /v1/members lists it. The same role again is a no-op that answers 200. The one refusal that is not about who asked: the last owner cannot be demoted, because a project nobody can manage is a project nobody can leave either — make somebody else an owner first (409).
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The member’s userId
Header Parameters
Section titled “Header Parameters ”Which of your projects to act in — an id from GET /v1/projects. Absent, your default project. A project you are not a member of answers 404, the same as one that does not exist. Ignored under a bearer token, which is bound to the project it was minted in.
Request Body required
Section titled “Request Body required ”object
What a member may do (B8-team). owner runs the project — members, roles, its name; member does everything else; reader is refused every write at the boundary, before a handler runs.
Example
{ "role": "reader"}Responses
Section titled “ Responses ”The member as they are now
object
The display name, once people have one (T3); null until then.
What a member may do (B8-team). owner runs the project — members, roles, its name; member does everything else; reader is refused every write at the boundary, before a handler runs.
Who invited them (a userId); null for the person the project was created by.
Example
{ "userId": "6f1c2b3a-0000-4000-8000-0000000000a2", "name": null, "role": "reader", "joinedAt": "2026-09-16T09:12:04.151Z", "invitedBy": "u-shop"}Invalid body — one of the three roles
object
Example generated
{ "error": "example"}No / invalid token or session
A member or a reader asked
object
Example
{ "error": "project owner only"}No such member in this project
object
Example
{ "error": "member '6f1c2b3a-0000-4000-8000-0000000000a2' not found"}The last owner
object
Example
{ "error": "a project needs an owner — make somebody else one first"}Rate-limited: either the per-route throttle or a tenant quota. Retry-After carries the seconds until the window rolls over.
object
Example generated
{ "error": "example"}Headers
Section titled “Headers ”Seconds until the window rolls over