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

Add User Template

POST
/api/user_template

Add a new user template

  • name can be up to 64 characters
  • data_limit must be in bytes and larger or equal to 0
  • expire_duration must be in seconds and larger or equat to 0
  • inbounds dictionary of protocol:inbound_tags, empty means all inbounds

Authorizations

Request Body required

object
name
string
nullable
data_limit

Data_limit can be 0 or greater

integer
expire_duration

Expire_duration can be 0 or greater in seconds

integer
username_prefix
string
>= 1 characters <= 20 characters
username_suffix
string
>= 1 characters <= 20 characters
inbounds
object
key
additional properties
Array<string>
{
"name": "my template 1",
"inbounds": {
"vmess": [
"VMESS_INBOUND"
],
"vless": [
"VLESS_INBOUND"
]
},
"data_limit": 0,
"expire_duration": 0
}

Responses

200

Successful Response

object
name
string
nullable
data_limit

Data_limit can be 0 or greater

integer
expire_duration

Expire_duration can be 0 or greater in seconds

integer
username_prefix
string
>= 1 characters <= 20 characters
username_suffix
string
>= 1 characters <= 20 characters
inbounds
object
key
additional properties
Array<string>
id
required
integer

403

You’re not allowed

409

Template by this name already exists

422

Validation Error

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