3x-ui3x-ui

Xray Settings

Xray configuration template, outbound management, Warp/Nord/PIA integration, and config testing. All endpoints under /panel/api/xray.

POST
/panel/api/xray/

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/'
Example Response200
{  "success": true,  "obj": {    "xraySetting": "{...raw xray config...}",    "inboundTags": "[\"in-443-tcp\"]",    "clientReverseTags": "[]",    "outboundTestUrl": "https://www.google.com/generate_204"  }}
GET
/panel/api/xray/getDefaultJsonConfig

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X GET 'https://example.com/panel/api/xray/getDefaultJsonConfig'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/getOutboundsTraffic

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X GET 'https://example.com/panel/api/xray/getOutboundsTraffic'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/getXrayResult

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X GET 'https://example.com/panel/api/xray/getXrayResult'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/update

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
xraySetting*string

Full Xray JSON config template.

outboundTestUrl?string

URL used for outbound reachability tests. Defaults to https://www.google.com/generate_204.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/update' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'xraySetting=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/warp/{action}

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Path Parameters

action*string

data — return Warp stats. del — delete Warp data. config — return current config. reg — register (sends keys). regMasque — register a separate device enrolled for MASQUE and return its warp key pair, addresses and endpoint. changeIp — rotate the endpoint. license — set a Warp+ key. interval — set automatic rotation in hours.

Request Body

application/x-www-form-urlencoded
  1. body
privateKey?string

Required when action=reg.

publicKey?string

Required when action=reg.

license?string

Required when action=license.

interval?integer

Non-negative hours between automatic rotations. Required when action=interval; 0 disables rotation.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/warp/string' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d ''
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/nord/{action}

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Path Parameters

action*string

countries — list available countries. servers — list servers in a country (sends countryId). reg — get NordVPN credentials (sends token). setKey — store NordVPN API key (sends key). data — return current NordVPN connection data. del — delete NordVPN data.

Request Body

application/x-www-form-urlencoded
  1. body
countryId?string

Required when action=servers.

token?string

Required when action=reg.

key?string

Required when action=setKey.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/nord/string' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d ''
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/pia/{action}

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Path Parameters

action*string

countries — list available countries from the signed PIA server list. servers — list regions and WireGuard servers in a country (sends countryCode). reg — sign in with a PIA username and password (sends username, password). data — return the signed-in account hint. del — delete stored PIA credentials. addKey — register a WireGuard key with the selected server (sends hostname) and return fields to build the outbound.

Request Body

application/x-www-form-urlencoded
  1. body
username?string

Required when action=reg.

password?string

Required when action=reg.

countryCode?string

Required when action=servers.

hostname?string

Required when action=addKey.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/pia/string' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d ''
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/resetOutboundsTraffic

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
tag*string

Outbound tag to reset (e.g. "proxy", "direct").

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/resetOutboundsTraffic' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'tag=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/testOutbound

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
outbound*string

JSON-encoded single outbound to test (required).

allOutbounds?string

JSON array of all outbounds — used to resolve dialerProxy chains.

mode?string

"tcp" for a fast dial-only probe (parallel-safe), "real" for a real-delay probe whose delay is the full request time including tunnel establishment. Default/empty uses a full HTTP probe reporting the warm per-request round-trip. Both HTTP variants run through a temp xray instance.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/testOutbound' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'outbound=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/testOutbounds

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
outbounds*string

JSON array of outbound configs to test (required).

allOutbounds?string

JSON array of all outbounds — used to resolve dialerProxy chains.

mode?string

"tcp" for fast dial-only probes (UDP-transport outbounds are still probed over HTTP), "real" for real-delay probes whose delay is the full request time including tunnel establishment. Default/empty routes an HTTP request through each outbound and reports the warm per-request round-trip.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/testOutbounds' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'outbounds=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/balancerStatus

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
tags*string

Comma-separated balancer tags to query (e.g. "b1,b2").

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/balancerStatus' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'tags=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/balancerOverride

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
tag*string

Balancer tag (required).

target?string

Outbound tag to force; it must exist in the running config. Empty clears the override and returns control to the strategy.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/balancerOverride' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'tag=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/routeTest

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
domain*string

Target domain. Either domain or ip is required.

Length1 <= length
ip?string

Target IP. Either domain or ip is required.

port?integer

Target port (optional).

network?string

"tcp" (default) or "udp".

inboundTag?string

Simulate arrival on this inbound (optional).

protocol?string

Sniffed protocol such as http, tls, bittorrent (optional).

email?string

User attribution for user-based rules (optional).

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/routeTest' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'domain=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/geodata/files

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X GET 'https://example.com/panel/api/xray/geodata/files'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/geodata/categories

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Query Parameters

file*string

Database file name inside the asset folder, e.g. geosite.dat (required).

q?string

Case-insensitive substring filter on the category code.

offset?integer

Rows to skip. Defaults to 0.

limit?integer

Rows to return, capped at 500. Omit it to return every category — the index is small and the panel filters it client-side.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X GET 'https://example.com/panel/api/xray/geodata/categories?file=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/geodata/entries

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Query Parameters

file*string

Database file name inside the asset folder (required).

code*string

Category code, case-insensitive, e.g. google (required).

q?string

Case-insensitive substring filter on the rule value.

offset?integer

Rows to skip. Defaults to 0.

limit?integer

Rows to return, capped at 500. Defaults to the cap.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X GET 'https://example.com/panel/api/xray/geodata/entries?file=string&code=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/geodata/validate

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
tokens*string

Comma-separated routing tokens, e.g. "geosite:google,geosite:blabla". Max 500 per request.

kind?string

"ip" to parse the tokens as IP rules (geoip:, ext-ip:, leading !). Anything else parses them as domain rules (geosite:, ext-site:).

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/geodata/validate' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'tokens=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/outbound-subs

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X GET 'https://example.com/panel/api/xray/outbound-subs'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
remark?string

Optional display label.

url*string

Subscription URL (required). Must be a public http(s) address; private/internal targets are blocked unless allowPrivate is true.

tagPrefix?string

Prefix for generated outbound tags. Defaults to the lowest free "sub-" prefix.

userAgent?string

Custom User-Agent sent when fetching this subscription. Defaults to "3x-ui-outbound-sub/1.0".

Default"3x-ui-outbound-sub/1.0"
updateInterval?integer

Seconds between auto-refreshes. Default 600.

Default600
enabled?boolean

Whether the subscription is active. Default true.

Defaulttrue
allowPrivate?boolean

Allow the URL to point at a private/internal/loopback address. Default false.

Defaultfalse
allowInsecure?boolean

Skip TLS certificate verification when fetching the subscription's URL. Default false.

Defaultfalse
prepend?boolean

Place this subscription's outbounds before the manual template outbounds. Default false.

Defaultfalse

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/outbound-subs' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'url=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs/{id}

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Path Parameters

id*integer

Subscription id.

Request Body

application/x-www-form-urlencoded
  1. body
remark?string

Optional display label.

url*string

Subscription URL (required). Must be a public http(s) address; private/internal targets are blocked unless allowPrivate is true.

tagPrefix?string

Prefix for generated outbound tags. Defaults to the lowest free "sub-" prefix.

userAgent?string

Custom User-Agent sent when fetching this subscription. Defaults to "3x-ui-outbound-sub/1.0".

Default"3x-ui-outbound-sub/1.0"
updateInterval?integer

Seconds between auto-refreshes. Default 600.

Default600
enabled?boolean

Whether the subscription is active. Default true.

Defaulttrue
allowPrivate?boolean

Allow the URL to point at a private/internal/loopback address. Default false.

Defaultfalse
allowInsecure?boolean

Skip TLS certificate verification when fetching the subscription's URL. Default false.

Defaultfalse
prepend?boolean

Place this subscription's outbounds before the manual template outbounds. Default false.

Defaultfalse

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/outbound-subs/0' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'url=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
DELETE
/panel/api/xray/outbound-subs/{id}

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Path Parameters

id*integer

Subscription id.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X DELETE 'https://example.com/panel/api/xray/outbound-subs/0'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs/{id}/del

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Path Parameters

id*integer

Subscription id.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/outbound-subs/0/del'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs/{id}/refresh

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Path Parameters

id*integer

Subscription id.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/outbound-subs/0/refresh'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs/{id}/move

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Path Parameters

id*integer

Subscription id.

Request Body

application/x-www-form-urlencoded
  1. body
dir?string

"up" to raise priority, anything else to lower it.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/outbound-subs/0/move' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d ''
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs/parse

Authorization

headerAuthorizationBearer <token>

Scoped API token from Settings → Security → API Token. Send as Authorization: Bearer <token>.

Request Body

application/x-www-form-urlencoded
  1. body
url*string

Subscription URL to preview (required).

userAgent?string

Custom User-Agent sent while fetching the preview.

allowPrivate?boolean

Allow a private/internal/loopback URL. Default false.

allowInsecure?boolean

Skip TLS certificate verification. Default false.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/xray/outbound-subs/parse' \  -H 'Content-Type: application/x-www-form-urlencoded' \  -d 'url=string'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}