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

AuthorizationBearer <token>

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

In: header

Response Body

application/json

curl -X POST "https://example.com/panel/api/xray/"
{  "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

AuthorizationBearer <token>

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

In: header

Response Body

application/json

curl -X GET "https://example.com/panel/api/xray/getDefaultJsonConfig"
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/getOutboundsTraffic

Authorization

AuthorizationBearer <token>

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

In: header

Response Body

application/json

curl -X GET "https://example.com/panel/api/xray/getOutboundsTraffic"
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/getXrayResult

Authorization

AuthorizationBearer <token>

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

In: header

Response Body

application/json

curl -X GET "https://example.com/panel/api/xray/getXrayResult"
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/update

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

action*string

data — return Warp stats. del — delete Warp data. config — return current config. reg — register (sends keys). changeIp — rotate the endpoint. license — set a Warp+ key. interval — set automatic rotation in hours.

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

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

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

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

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Response Body

application/json

curl -X GET "https://example.com/panel/api/xray/geodata/files"
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/geodata/categories

Authorization

AuthorizationBearer <token>

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

In: header

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

application/json

curl -X GET "https://example.com/panel/api/xray/geodata/categories?file=string"
{  "success": true,  "msg": "string",  "obj": null}
GET
/panel/api/xray/geodata/entries

Authorization

AuthorizationBearer <token>

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

In: header

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

application/json

curl -X GET "https://example.com/panel/api/xray/geodata/entries?file=string&code=string"
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/geodata/validate

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Response Body

application/json

curl -X GET "https://example.com/panel/api/xray/outbound-subs"
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*integer

Subscription id.

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*integer

Subscription id.

Response Body

application/json

curl -X DELETE "https://example.com/panel/api/xray/outbound-subs/0"
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs/{id}/del

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*integer

Subscription id.

Response Body

application/json

curl -X POST "https://example.com/panel/api/xray/outbound-subs/0/del"
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs/{id}/refresh

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*integer

Subscription id.

Response Body

application/json

curl -X POST "https://example.com/panel/api/xray/outbound-subs/0/refresh"
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/xray/outbound-subs/{id}/move

Authorization

AuthorizationBearer <token>

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

In: header

Path Parameters

id*integer

Subscription id.

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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

Authorization

AuthorizationBearer <token>

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

In: header

Request Body

application/x-www-form-urlencoded

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

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