organization.removeMember
DELETE
/v1/organization/members/{userId}
const url = 'https://example.com/v1/organization/members/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/v1/organization/members/example \ --header 'Authorization: Bearer <token>'Removes a member and revokes their tokens. If their email domain is still allowed, they join again the next time they sign in. Suspend them to keep them out.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”userId
required
string
Responses
Section titled “Responses”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
Media typeapplication/json
object
_tag
required
string
userId
required
string
Example
{ "_tag": "MemberNotFound"}@nmnmcc/ability/Authorizer/Pending | LastSuperAdministrator
RateLimited
Media typeapplication/json
object
_tag
required
string
retryAfterSeconds
required
integer
Example
{ "_tag": "RateLimited"}OrganizationStorageUnavailable | AuthenticationUnavailable | RequestFailed