Change a member's role
curl --request PATCH \ --url https://api.whatsbuilt.fi/v1/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/members/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "project_role": "viewer" }'The owner’s role cannot be changed (409 PROJECT_OWNER_ROLE_LOCKED), and the role can be at most the integration’s own. An integration’s membership is not a person’s: its id answers 404.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”The body of updateMemberRole.
object
A role a member route gives.
Responses
Section titled “Responses”The member
A live member.
object
The project.
The person.
Their name, read when answering.
Their e-mail, read when answering.
Their role on the project.
Their organisation.
Null when the member’s organisation is not readable to the principal
The member belongs to another organisation than the project’s owner
Who added them.
When they were added.
The row’s change time.
Example
{ "project_role": "owner", "deleted": false}Invalid body, parameters or Idempotency-Key
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}INSUFFICIENT_SCOPE; INSUFFICIENT_PROJECT_ROLE when the integration is not the project’s admin, or the role is above its own; MEMBER_EXTERNAL_ADD_FORBIDDEN when the project is another organisation’s; PUBLIC_API_DISABLED
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}No such project or member; MEMBER_EMAIL_NOT_FOUND when no person has the address
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}PROJECT_OWNER_ROLE_LOCKED
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}IDEMPOTENCY_KEY_REUSED: the key was used with another body
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED; wait for Retry-After seconds
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}