User

Modify User

Modify an existing user

  • username: Cannot be changed. Used to identify the user.
  • status: User's new status. Can be 'active', 'disabled', 'on_hold', 'limited', or 'expired'.
  • expire: UTC datetime for new account expiration. Set to 0 for unlimited, null for no change.
  • data_limit: New max data usage in bytes (e.g., 1073741824 for 1GB). Set to 0 for unlimited, null for no change.
  • data_limit_reset_strategy: New strategy for data limit reset. Options include 'daily', 'weekly', 'monthly', or 'no_reset'.
  • proxies: Dictionary of new protocol settings (e.g., vmess, vless). Empty dictionary means no change.
  • group_ids: List of new group IDs to assign to the user. Empty list means no change.
  • note: New optional text for additional user information or notes. null means no change.
  • on_hold_timeout: New UTC timestamp for when on_hold status should start or end. Only applicable if status is changed to 'on_hold'.
  • on_hold_expire_duration: New duration (in seconds) for how long the user should stay in on_hold status. Only applicable if status is changed to 'on_hold'.
  • next_plan: Next user plan (resets after use).

Note: Fields set to null or omitted will not be modified.

put/api/user/{username}

Path parameters

usernamestring required

Request body

data_limitinteger nullable

data_limit can be 0 or greater

data_limit_reset_strategy'no_reset' | 'day' | 'week' | 'month' | 'year'
notestring nullable
on_hold_expire_durationinteger nullable
group_idsinteger[] nullable
auto_delete_in_daysinteger nullable
hwid_limitinteger nullable
status'active' | 'disabled' | 'limited' | 'expired' | 'on_hold'

Response

Successful Response

data_limitinteger nullable

data_limit can be 0 or greater

data_limit_reset_strategy'no_reset' | 'day' | 'week' | 'month' | 'year'
notestring nullable
on_hold_expire_durationinteger nullable
group_idsinteger[] nullable
auto_delete_in_daysinteger nullable
hwid_limitinteger nullable
idinteger required
usernamestring required
status'active' | 'disabled' | 'limited' | 'expired' | 'on_hold' required
used_trafficinteger required
lifetime_used_trafficinteger
created_atstring date-time required
edit_atstring date-time nullable
online_atstring date-time nullable
subscription_urlstring

Changes