organization.updateMember
PATCH
/v1/organization/members/{userId}
const url = 'https://example.com/v1/organization/members/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"status":"active","roles":["super_administrator"],"policy":"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://example.com/v1/organization/members/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "status": "active", "roles": [ "super_administrator" ], "policy": "example" }'Changes the status, roles or extra policy of a member. A suspended member cannot sign in, and their tokens stop working.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
status
string
roles
Array
policy
string
Responses
Section titled “Responses”Success
OrganizationRequired
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "OrganizationRequired"}AuthenticationRequired
Media typeapplication/json
object
_tag
required
string
Example
{ "_tag": "AuthenticationRequired"}@nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin
MemberNotFound | RoleNotFound
@nmnmcc/ability/Authorizer/Pending | LastSuperAdministrator
RateLimited
Media typeapplication/json
object
_tag
required
string
retryAfterSeconds
required
integer
Example
{ "_tag": "RateLimited"}OrganizationStorageUnavailable | AuthenticationUnavailable | RequestFailed