Перейти к содержимому

Modify User

PUT
/api/user/{username}

Modify a user

  • set expire to 0 to make the user unlimited in time, null to no change
  • set data_limit to 0 to make the user unlimited in data, null to no change
  • proxies dictionary of protocol:settings, empty means no change
  • inbounds dictionary of protocol:inbound_tags, empty means no change

Authorizations

Parameters

Path Parameters

username
required
string

Request Body required

object
proxies
object
key
additional properties
object
expire
integer
nullable
data_limit

Data_limit can be 0 or greater

integer
data_limit_reset_strategy

An enumeration.

string
Allowed values: no_reset day week month year
inbounds
object
key
additional properties
Array<string>
note
string
nullable
sub_updated_at
string format: date-time
nullable
sub_last_user_agent
string
nullable
online_at
string format: date-time
nullable
on_hold_expire_duration
integer
nullable
on_hold_timeout
string format: date-time
nullable
status

An enumeration.

string
Allowed values: active disabled on_hold
{
"proxies": {
"vmess": {
"id": "35e4e39c-7d5c-4f4b-8b71-558e4f37ff53"
},
"vless": {}
},
"inbounds": {
"vmess": [
"VMess TCP",
"VMess Websocket"
],
"vless": [
"VLESS TCP REALITY",
"VLESS GRPC REALITY"
]
},
"expire": 0,
"data_limit": 0,
"data_limit_reset_strategy": "no_reset",
"status": "active",
"note": "",
"on_hold_timeout": "2023-11-03T20:30:00",
"on_hold_expire_duration": 0
}

Responses

200

Successful Response

object
proxies
required
object
expire
integer
nullable
data_limit

Data_limit can be 0 or greater

integer
data_limit_reset_strategy
string
Allowed values: no_reset day week month year
inbounds
object
key
additional properties
Array<string>
note
string
nullable
sub_updated_at
string format: date-time
nullable
sub_last_user_agent
string
nullable
online_at
string format: date-time
nullable
on_hold_expire_duration
integer
nullable
on_hold_timeout
string format: date-time
nullable
username
required
string
status
required

An enumeration.

string
Allowed values: active disabled limited expired on_hold
used_traffic
required
integer
lifetime_used_traffic
integer
created_at
required
string format: date-time
links
Array<string>
default:
subscription_url
string
""
excluded_inbounds
object
key
additional properties
Array<string>

403

You’re not allowed

404

User not found

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string