Introduction
The XyraPanel API provides programmatic access to manage your servers, users, nodes, and other resources. The API is built on RESTful principles and returns JSON responses.Base URL
The API is accessible at your XyraPanel installation URL. The base URL is configured via environment variables:/api. For example:
API Namespaces
The XyraPanel API is organized into several namespaces:Client API (/api/client/*)
Manage your servers, files, databases, backups, and more. These endpoints require user authentication.
Admin API (/api/admin/*)
Administrative endpoints for managing users, nodes, eggs, and servers. Requires admin privileges.
Account API (/api/account/*)
Manage your account settings, API keys, sessions, and security preferences.
Application API (/api/application/*)
Advanced application-level endpoints for system management.
Response Format
All API responses return JSON with a consistent structure:Success Response
List Response with Pagination
Error Response
HTTP Methods
The API uses standard HTTP methods:GET- Retrieve resourcesPOST- Create new resourcesPUT/PATCH- Update existing resourcesDELETE- Remove resources
Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Resource created |
204 | Success with no content |
400 | Bad request / validation error |
401 | Authentication required |
403 | Forbidden / insufficient permissions |
404 | Resource not found |
413 | Request body too large |
429 | Rate limit exceeded |
500 | Internal server error |
Content Type
All requests and responses useapplication/json as the content type.
Getting Started
To start using the API:- Authenticate using API keys or session cookies
- Review the rate limits to understand usage restrictions
- Explore the endpoint documentation for specific resources
The API is built with Better Auth and includes advanced security features like CSRF protection, rate limiting, and secure session management.