Remove a platform admin from the Account
/portal/v1/accounts/{accountSlug}/members/{memberId}Removes one AccountMember by memberId and immediately revokes their outstanding access tokens so they lose access before token expiry. Self-removal is rejected (400), owners are non-removable (403) so ownership can never be orphaned, and an unknown member returns 404. Writes an account_member.removed audit row and responds 204.
Authentication
AuthorizationJWT access token. Never send alongside X-API-Key: a request carrying both is refused.
administrators.manageGovernanceInvite, deactivate, and remove administrators. Granted through an administrator role in the Admin Workspace; a valid token without it is refused with 403.
Path Parameters
memberIdstring Required Responses
Member removed
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
Errors
When the request can't be completed, the response body includes a stable error code you can branch on.
account.capability_requiredForbiddenThe signed-in user's administrator roles do not grant the capability this endpoint requires.
Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.
curl -X DELETE "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/members/value" \ -H "Authorization: Bearer $CANOPY_TOKEN"
HTTP/1.1 204 Member removed (empty body)
Tell us how we can improve this guide.