Update a member's role and/or activation status.
const url = 'https://api.adversarial.com/api/v1/organizations/members/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"active":true,"roles":["example"]}'};
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://api.adversarial.com/api/v1/organizations/members/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "active": true, "roles": [ "example" ] }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The UUID of the member to update
Request Bodyrequired
Section titled “Request Bodyrequired”object
Set to true to reactivate a deactivated user.
Absent means “don’t change activation status”.
false is rejected — use DELETE to deactivate.
Names of the roles to assign (e.g. [“admin”], [“editor”, “viewer”]). Absent means “don’t change roles”.
Examplegenerated
{ "active": true, "roles": [ "example" ]}Responses
Section titled “Responses”Member updated
object
Relative path to the user’s avatar endpoint, e.g.
"users/{id}/avatar?v={hash}". None when the user has no avatar.
Kind of principal an OrganizationMember represents. Always HUMAN on the
/v1/users endpoint today; included on the wire so consumers have a single
discriminator regardless of which endpoint surfaced the row.
Wire format is SCREAMING_SNAKE_CASE so the values read as constants (HUMAN,
SERVICE_ACCOUNT).
Example
{ "kind": "HUMAN"}Invalid request
Forbidden - insufficient permissions
User not found in organization