1. Docs
  2. API Reference
  3. Remove a platform admin from the Account

Remove a platform admin from the Account

DELETE/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

Bearer TokenAuthorization

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

Requires capability administrators.manageGovernance

Invite, 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

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

Errors

When the request can't be completed, the response body includes a stable error code you can branch on.

403account.capability_requiredForbidden
When it happens

The signed-in user's administrator roles do not grant the capability this endpoint requires.

Remediation

Ask an account administrator to grant a role carrying the capability named in the Authentication section, then retry.

Request
curl -X DELETE "https://auth.canopy-io.com/portal/v1/accounts/{accountSlug}/members/value" \
  -H "Authorization: Bearer $CANOPY_TOKEN"
Response
HTTP/1.1 204 Member removed

(empty body)
Related endpoints
GETList platform-admin members of the Account
Was this page helpful?

Tell us how we can improve this guide.