Navigation

Suspend a user

Mark a user as suspended. On every later evaluation the is_suspended policy condition matches for this user until you unsuspend them, so a policy that denies or suspends on that condition keeps them out. This is the same flag the suspend verdict sets. Pass the user ID your application uses when it evaluates an action with the client SDK. Suspending a user who is already suspended changes nothing and still returns the user.

Parameters


user string REQUIRED

The user ID your application uses to identify this user to Rupt.


Returns


Returns the user object with suspended set to true. Returns 404 when no user with that ID exists in the environment your project secret belongs to.
POST/v3/user/:id/suspend
const user = await rupt.suspendUser({ user: "USER_ID" });
Response
{
  "rupt_id": "649873be6e8b6f9b33722a0c",
  "id": "external_account_id",
  "email": "user@example.com",
  "phone": "+15551234567",
  "suspended": true
}