Skip to content

PATCH /api/v1/admin/orgs/:slug/members/:id/status

This page is auto-generated from src/admin/routes.ts. Do not edit by hand — see docs/dev/docs-auto-sync.md.

:warning: Heuristic extraction — not a contract. Response shapes below are mined from c.json(...) literals in the handler via an AST walker. Computed fields, ternaries, and non-literal returns are shown as placeholders. Refer to the linked source file for the authoritative behaviour.

PATCH /api/v1/admin/orgs/:slug/members/:id/status

Section titled “PATCH /api/v1/admin/orgs/:slug/members/:id/status”

Requires the following capability(ies):

  • members:w

Other middleware observed on this route (heuristic):

  • requireCapability
  • memberStatusBody
{
"error": "Org not found"
}
{
"error": "Invalid JSON body"
}
{
"error": "Body must be a JSON object"
}
{
"error": "status must be 'active' or 'suspended'"
}
{
"error": "Member not found"
}
{
"error": "Cannot change your own membership status"
}
{
"error": "Cannot suspend the last active admin"
}
{
"id": <member-expr>,
"status": <member-expr>
}
{
"error": "Member is removed; re-invite them to restore access"
}
{
"error": "Stytch client unavailable; cannot revoke sessions"
}
{
"id": <member-expr>,
"status": <nextStatus>
}
  • File: src/admin/routes.ts
  • Line: 2925