Update user suspension status

PATCH /api/users/{userId}/is-suspended

Update user suspension status for the given ID.

Path parameters

  • userId string Required

    The unique identifier of the user.

application/json

Body Required

  • isSuspended boolean Required

    New suspension status for the user.

Responses

PATCH /api/users/{userId}/is-suspended
curl \
 -X PATCH https://[tenant_id].logto.app/api/users/{userId}/is-suspended \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"isSuspended":true}'
Request examples
{
  "isSuspended": true
}
Response examples (200)
{
  "id": "string",
  "username": "string",
  "primaryEmail": "string",
  "primaryPhone": "string",
  "name": "string",
  "avatar": "string",
  "customData": {},
  "identities": {
    "userId": "string",
    "details": {}
  },
  "lastSignInAt": 42.0,
  "createdAt": 42.0,
  "updatedAt": 42.0,
  "profile": {
    "familyName": "string",
    "givenName": "string",
    "middleName": "string",
    "nickname": "string",
    "preferredUsername": "string",
    "profile": "string",
    "website": "string",
    "gender": "string",
    "birthdate": "string",
    "zoneinfo": "string",
    "locale": "string",
    "address": {
      "formatted": "string",
      "streetAddress": "string",
      "locality": "string",
      "region": "string",
      "postalCode": "string",
      "country": "string"
    }
  },
  "applicationId": "string",
  "isSuspended": true,
  "hasPassword": true,
  "ssoIdentities": [
    {
      "tenantId": "string",
      "id": "string",
      "userId": "string",
      "issuer": "string",
      "identityId": "string",
      "detail": {},
      "createdAt": 42.0,
      "ssoConnectorId": "string"
    }
  ]
}