Auth API reference

Auth API · Consumer-Admin

patch/{app_slug}/v1/admin/users/{user_id}/statusAuth

Change an end-user status (active / suspended / deactivated)

Setting status to `suspended` or `deactivated` also revokes all active sessions for the user (same behaviour as the auth-admin equivalent).

Path parameters

app_slug*string

Slug of the app.

user_id*string

Id of the user.

Request body

status*enum (3)

New account status: `active`, `suspended` or `deactivated`.

Response · 200

id*string

Unique identifier of the end user.

username*string

The end user's username, unique within the app.

display_name*string

Human-readable name of the end user.

status*string

Account status: `active`, `suspended` or `deactivated`.

role*string

App-level role name of the user, or `null` for none.

joined_at*string · date-time

When the member joined the tenant (ISO 8601).

created_at*string · date-time

When the end user was created (ISO 8601).

email*string

Email address.

email_verified_at*string · date-time

When the primary email was verified, or `null` until it is.

active_session_count*number

Sessions of the user that are currently active.

last_used_at*string · date-time

When the end user was last used (ISO 8601), or `null` if never.

Example

Request

PATCH https://api.auth.productcraft.co/{app_slug}/v1/admin/users/{user_id}/status
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "status": "active"
}

Response

{
  "id": "string",
  "username": "string",
  "display_name": "string",
  "status": "string",
  "role": "string",
  "joined_at": "2026-01-01T00:00:00.000Z",
  "created_at": "2026-01-01T00:00:00.000Z",
  "email": "string",
  "email_verified_at": "2026-01-01T00:00:00.000Z",
  "active_session_count": 0,
  "last_used_at": "2026-01-01T00:00:00.000Z"
}