Remove a member

DESTRUCTIVE. Remove a member from a sub-account (deletes their membership; the user account itself is kept).

DELETE https://api.centerfy.ai/webhooks/inbound/agency/sub-accounts/:id/users/:userId

Headers

HeaderRequiredValueDescription
x-api-keyYesyour agency API key (cfy_…)Agency (organization-wide) API key, created in the agency workspace under Settings → API Keys (“Agency API Keys”; the tab only appears on White Label or SaaS Mode plans). Or send Authorization: Bearer <key>; x-api-key wins if both are present. Keys must start with cfy_. A sub-account key is rejected with 401.

Path parameters

NameTypeRequiredDescription
idstring (uuid)YesThe sub-account id. Must belong to the key’s agency and not be deleted.
userIdstring (uuid)YesThe member’s user id (user_id from List members).

Example

curl -X DELETE "https://api.centerfy.ai/webhooks/inbound/agency/sub-accounts/{id}/users/{userId}" \
  -H "x-api-key: $CENTERFY_AGENCY_API_KEY"
import { CenterfyAgencyClient } from "@centerfy/sdk";

const agency = new CenterfyAgencyClient({ apiKey: process.env.CENTERFY_AGENCY_API_KEY! });

const result = await agency.subAccountUsers.remove("<subAccountId>", "<userId>");
console.log(result);
centerfy --agency subAccountUsers remove <subAccountId> <userId>

MCP tool: centerfy_agency_sub_account_users_remove (see MCP server)

Response

{
  "status": "success",
  "removed": true,
  "user_id": "9e5d7062-cf81-42a3-9e4f-5a6b7c8d9e05"
}

Errors

  • 404 — if userId is not a member of this sub-account.
  • 409 — when removing the last active owner.
  • 404 — when the sub-account id is not a uuid, does not exist, is deleted, or belongs to another agency.
  • 401 — when the key is missing, not cfy_-prefixed or unknown (including sub-account keys); 403 when the agency is not on a White Label or SaaS Mode plan; 429 above 50 requests per minute per agency (Retry-After header set); 500 ‘database error’ on an internal failure.

Notes

Pending invitations can’t be removed here.

© 2026 Centerfy AI. All rights reserved.