Update Membership
Update a the role or permissions of a membership.
Requires the hubs-members-manage permission.
query
Arguments
- rolestringoptional
Update the role of the membership.
owner
|admin
|developer
|analyst
- permissionsobjectoptional
Update the memberships environment permissions.
Returns
Returns a member resource, otherwise returns an Error.
PATCH /v1/hubs/current/members/{ID}
Example Request
$ curl https://api.cycle.io/v1/hubs/current/members/5a232a77b6393d0001ac2df2 \-H'Authorization: Bearer API_KEY'\-H'X-Hub-Id: HUB_ID'\-H 'Content-Type: application/json' \-d '{"role":"admin","capabilities":{"all_environments":false,"environments":[{"id":"5cc78aa0db2ab000014a8b98","manage":false}]}}' \-X PATCH
Example Response
{"data": {"id": "5b9c2a77b6393d0001eb45fd","account_id": "5a232a77b6393d0001ac2df2","hub_id": "5ccc2a2226393d1231eb4abd","events": {"created": "2021-04-06T18:32:21.783Z","updated": "2021-04-12T19:57:49.767Z","deleted": "0001-01-01T00:00:00Z","joined": "2021-04-06T18:32:27.02Z"},"state": {"changed": "2021-04-06T18:32:27.092Z","current": "accepted"},"role": 2,"permissions": {"all_environments": true,"environments": []},"preferences": {"notifications": {"api_keys": false}},"invitation": {"sender": {"id": "5ccc2a2226393d1231eb4abd","type": "account"},"recipient": "demouser@cycleplatform.io","events": {"accepted": "2021-04-06T18:32:27.02Z","declined": "0001-01-01T00:00:00Z","revoked": "0001-01-01T00:00:00Z"}}}}