User

Add User

Add a new user

  • username: 3 to 32 characters, can include a-z, 0-9, and underscores.
  • status: User's status, defaults to active. Special rules if on_hold.
  • expire: UTC timestamp for account expiration. Use 0 for unlimited.
  • data_limit: Max data usage in bytes (e.g., 1073741824 for 1GB). 0 means unlimited.
  • data_limit_reset_strategy: Defines how/if data limit resets. no_reset means it never resets.
  • proxies: Dictionary of protocol settings (e.g., vmess, vless).
  • inbounds: Dictionary of protocol tags to specify inbound connections.
  • note: Optional text field for additional user information or notes.
  • on_hold_timeout: UTC timestamp when on_hold status should start or end.
  • on_hold_expire_duration: Duration (in seconds) for how long the user should stay in on_hold status.
  • next_plan: Next user plan (resets after use).
post/api/user

Request body

proxiesobject
expireinteger nullable
data_limitinteger nullable

data_limit can be 0 or greater

data_limit_reset_strategy'no_reset' | 'day' | 'week' | 'month' | 'year'
inboundsobject
notestring nullable
sub_updated_atstring date-time nullable
sub_last_user_agentstring nullable
online_atstring date-time nullable
on_hold_expire_durationinteger nullable
on_hold_timeoutstring date-time nullable
auto_delete_in_daysinteger nullable
usernamestring required
status'active' | 'on_hold'

Example request

{
  "data_limit": 0,
  "data_limit_reset_strategy": "no_reset",
  "expire": 0,
  "inbounds": {
    "vless": [
      "VLESS TCP REALITY",
      "VLESS GRPC REALITY"
    ],
    "vmess": [
      "VMess TCP",
      "VMess Websocket"
    ]
  },
  "next_plan": {
    "add_remaining_traffic": false,
    "data_limit": 0,
    "expire": 0,
    "fire_on_either": true
  },
  "note": "",
  "on_hold_expire_duration": 0,
  "on_hold_timeout": "2023-11-03T20:30:00",
  "proxies": {
    "vless": {},
    "vmess": {
      "id": "35e4e39c-7d5c-4f4b-8b71-558e4f37ff53"
    }
  },
  "status": "active",
  "username": "user1234"
}

Response

Successful Response

proxiesobject required
expireinteger nullable
data_limitinteger nullable

data_limit can be 0 or greater

data_limit_reset_strategy'no_reset' | 'day' | 'week' | 'month' | 'year'
inboundsobject
notestring nullable
sub_updated_atstring date-time nullable
sub_last_user_agentstring nullable
online_atstring date-time nullable
on_hold_expire_durationinteger nullable
on_hold_timeoutstring date-time nullable
auto_delete_in_daysinteger nullable
usernamestring required
status'active' | 'disabled' | 'limited' | 'expired' | 'on_hold' required
used_trafficinteger required
lifetime_used_trafficinteger
created_atstring date-time required
linksstring[]
subscription_urlstring
excluded_inboundsobject

Changes

No recorded changes to this endpoint across all 1 revision of this API.