Update organization member roles
const url = 'https://localhost:8080/api/v1/organizations/example/members/example';const options = { method: 'PATCH', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"roles":["organization_owner"]}'};
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://localhost:8080/api/v1/organizations/example/members/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "roles": [ "organization_owner" ] }'Replace the roles assigned to an existing organization member
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Organization ID or UUID (bare or urn:uuid)
User UUID (bare or urn:uuid) or did:key
Request Body
Section titled “Request Body ”Updated roles
object
Replaces the member’s roles
Example
[ "organization_owner"]Responses
Section titled “ Responses ”Member roles updated successfully
The roles a member holds after the update, replacing whatever they held before
object
Example generated
{ "organizationId": 1, "roles": [ "example" ], "userId": "example"}Invalid request
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Unauthorized
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Forbidden - requires Organization Owner role
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Organization, user, or membership not found
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Internal server error
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}