3x-ui3x-ui

Settings

Panel configuration and user credentials. All endpoints live under /panel/api/setting and require a logged-in session or Bearer token.

POST
/panel/api/setting/all

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/setting/all'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/setting/defaultSettings

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/setting/defaultSettings'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/setting/factoryDefaults

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/setting/factoryDefaults'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/setting/update

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/setting/update' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/setting/validateRegex

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/setting/validateRegex' \  -H 'Content-Type: application/json' \  -d '{  "regex": "(?m)^general-purpose$"}'
Example Response200
{  "success": true,  "msg": ""}
POST
/panel/api/setting/updateUser

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
oldUsername*string

Current admin username.

oldPassword*string

Current admin password.

newUsername*string

Desired new username.

newPassword*string

Desired new password.

Response Body

Successful response

application/json
  1. response
success?boolean
msg?string
obj?unknown
Example Request
curl -X POST 'https://example.com/panel/api/setting/updateUser' \  -H 'Content-Type: application/json' \  -d '{  "oldUsername": "admin",  "oldPassword": "admin",  "newUsername": "newadmin",  "newPassword": "newpass"}'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/setting/restartPanel

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/setting/restartPanel'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}
POST
/panel/api/setting/testSmtp

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/setting/testSmtp'
Example Response200
{  "success": true,  "stage": "send",  "msg": "Test email sent successfully"}
POST
/panel/api/setting/testTgBot

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/setting/testTgBot'
Example Response200
{  "success": true,  "msg": "Test message sent to Telegram"}
POST
/panel/api/setting/tgBotCapabilities

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?

TgBotCapabilities is the browser-safe shape of the bot's own capabilities.

Example Request
curl -X POST 'https://example.com/panel/api/setting/tgBotCapabilities'
Example Response200
{  "success": true,  "obj": {    "groupPrivacy": false,    "inlineEnabled": true,    "running": true,    "username": "xui_bot"  }}
POST
/panel/api/setting/testDiscord

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/setting/testDiscord'
Example Response200
{  "success": true,  "msg": "Test notification sent successfully"}
GET
/panel/api/setting/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/setting/getDefaultJsonConfig'
Example Response200
{  "success": true,  "msg": "string",  "obj": null}