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

Add User

POST
/api/user

Add a new user

  • username must have 3 to 32 characters and is allowed to contain a-z, 0-9, and underscores in between
  • expire must be an UTC timestamp
  • data_limit must be in Bytes, e.g. 1073741824B = 1GB
  • proxies dictionary of protocol:settings
  • inbounds dictionary of protocol:inbound_tags, empty means all inbounds

Authorizations

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
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

An enumeration.

string
Allowed values: active on_hold
{
"username": "user1234",
"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>

409

User already exists

422

Validation Error

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