OrganizationsOrganization members
Change an organization member's role
PATCH
By membership id. Answered by the auth plugin, whose refusals are { code, message } rather than { error }.
Who may call it: An owner, security admin or admin of the organization. API keys: no.
sessioncookie
gamma.session_token<token>The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.
slug*stringThe organization's slug, as in its URL.
memberId*stringapplication/json- body
role*stringWithin the caller's ceiling, for the role they hold now and the new one: an admin up to admin, a security admin up to securityAdmin, an owner any.
Value in
"owner""securityAdmin""admin""projectCreator""member"OK.
application/json- response
A person's membership of an organization.
id*stringThe membership's id.
organizationId*stringuserId*stringrole*stringowner, admin, member, or guest (on projects only).
createdAt*stringWhen they joined.
Format
date-timeuser*Example Request
curl -X PATCH 'http://localhost:3000/api/organizations/string/members/string' \ -H 'Content-Type: application/json' \ -d '{ "role": "owner"}'Example Response
{ "id": "string", "organizationId": "string", "userId": "string", "role": "string", "createdAt": "2019-08-24T14:15:22Z", "user": { "id": "string", "name": "string", "email": "string", "image": "string" }}