User Account

Suspend a user as admin

Changed on

Suspends the explicit target user with an administrator-supplied reason.

Cognito JWTs and Aura Historia access tokens are accepted. The caller's persisted user role must be ADMIN; delegated Aura Historia access tokens must also have users:write. Authorization is enforced in the User service, not only at the HTTP route.

userId must be a valid User ID. reason is required, must not be empty or whitespace-only, and is limited to 1,000 bytes. It is emitted to structured operational logs, so it must not contain tokens, passwords, credentials, or other secrets. Common credential markers are rejected. Suspension is idempotent: a repeated request returns the target's suspended state. The final active administrator cannot be suspended. Once committed, a suspended user is rejected as 401 INVALID_CREDENTIALS by all later Cognito JWT and Aura access-token authentication. Every response sends Cache-Control: no-store.

put/api/v1/admin/users/{userId}/suspension

Request

  • Base URL: https://api.stage.aura-historia.com
  • URL: https://api.stage.aura-historia.com/api/v1/admin/users/{userId}/suspension
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer

Path parameters

userIdstring required

Unique User ID for the user to suspend.

Request body

reasonstring required

Non-empty, non-whitespace explanation for the suspension. This value is emitted to structured operational logs; do not include tokens, passwords, credentials, or other secrets. Common credential markers are rejected.

Example request

{
  "reason": "Repeated policy violations"
}

Response

User is suspended, including after an idempotent repeat.

userIdstring required

Identifier of the target user.

suspendedboolean required

Current suspension state; true after this operation, including an idempotent repeat.

Example response

{
  "suspended": true
}

Changes

    • breaking

      the response's property format changed from uuid to no format for status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • breaking

      removed the required property / from the response with the status

    • info

      for the path request parameter userId, the format was generalized from uuid to no format

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the required property / to the response with the status

    • info

      endpoint added