XUI.ONE Admin API

v1.5.13 OAS 3.0
☀️ 🌙
📢 Note: This documentation is for XUI.ONE v1.5.13+. Replace placeholder values with your actual credentials.
⚠️ CORS Notice - "Try it out" Feature: When testing API endpoints directly in Swagger UI using the "Try it out" button, you may encounter a Failed to fetch error. This is NORMAL and EXPECTED browser behavior due to CORS (Cross-Origin Resource Security) policy.

Why this happens: Your browser blocks requests from this documentation site (GitHub Pages) to your XUI.ONE server for security reasons.

Solutions for testing:
  • ✅ Use cURL commands (copy from Swagger UI examples)
  • ✅ Use Postman, Insomnia, or similar API tools
  • ✅ Use the code examples (Python, PHP, JavaScript)
  • ⚙️ Temporarily enable CORS on your server (not recommended for production)
Important: This CORS error does NOT mean the documentation or API is broken. It's a browser security feature protecting your server.

XUI.ONE Admin API Documentation

Comprehensive API documentation for XUI.ONE IPTV Panel Administration

🎯 Quick Start

This API provides programmatic access to manage your IPTV platform with 111 endpoints for:

  • 📺 Manage subscriptions (Lines, MAG, Enigma2 devices)
  • 🎬 Control streams, channels, movies, and series
  • 📊 Monitor connections and activity logs
  • ⚙️ Configure servers and load balancers

🔗 Base URL Pattern

{protocol}://YOUR_SERVER:{port}/<Access-Code>/?api_key=<API-KEY>&action=ACTION

Customize:

  • {protocol} → http or https
  • YOUR_SERVER → Your server domain/IP (e.g., 192.168.1.100)
  • {port} → Your port (80, 8000, 9000, or custom)
  • <Access-Code> → Your access code (e.g., cSbuFLhp)
  • <API-KEY> → Your API key
  • ACTION → API action name (e.g., get_lines)

🔐 Authentication Setup

Required:

  1. XUI.ONE panel installed (v1.5.5+)
  2. Admin API access code created
  3. API key generated from profile

Quick Setup:

  1. Panel → Management → Access Control → Access Codes
  2. Create "Admin API" access code
  3. Profile → Generate API Key
  4. Test: curl "http://your-server.com/<Access-Code>/?api_key=<API-KEY>&action=user_info"

📝 Request Methods

GET - Query data

/?api_key=<API-KEY>&action=get_lines

POST - Create/update data

curl -X POST ".../?api_key=<API-KEY>&action=create_line" -d "username=test"

Response Format

Success:

{ "status": "STATUS_SUCCESS", "data": { ... } }

Error:

{ "status": "STATUS_FAILURE", "error": "Error description" }
View on GitHub