v1.0.0
OpenAPI 3.0.3

xCloud Public API

xCloud Public API

A self-service REST API for all xCloud customers. Use this API to programmatically manage your servers, sites, databases, backups, cron jobs, and more — directly from your own scripts, CI/CD pipelines, or integrations.


Authentication

All API requests (except GET /health) require a Sanctum Personal Access Token passed as a Bearer token in the Authorization header.

Creating a Token

  1. Log in to app.xcloud.host
  2. Navigate to Account → API Tokens (/user/api-tokens)
  3. Click Create New Token
  4. Select the required scopes for your use case
  5. Copy the token — it is shown only once

Available Scopes

Scope Access
read:servers List and view servers, databases, cron jobs, PHP versions, monitoring, sudo users
write:servers Reboot servers, create WordPress sites, manage sudo users
read:sites List and view sites, backups, SSL, domain, git, deployment logs, SSH config
write:sites Trigger backups, rescue sites, purge cache, update SSH/SFTP config
* Full access to all endpoints

Required Headers

Authorization: Bearer <your-token>
Accept: application/json
Content-Type: application/json

Response Format

All responses follow a consistent envelope:

{
  "success": true,
  "message": "Operation completed successfully.",
  "data": { ... }
}

For paginated lists, data contains:

{
  "data": [ ... ],
  "meta": {
    "current_page": 1,
    "last_page": 5,
    "per_page": 15,
    "total": 72
  }
}

HTTP Status Codes

Code Meaning
200 OK Request successful
202 Accepted Async operation queued (e.g. reboot, backup)
400 Bad Request Validation error — check errors in response body
401 Unauthorized Missing or invalid token
403 Forbidden Token lacks the required scope
404 Not Found Resource not found or not accessible to your team
422 Unprocessable Entity Business logic validation failure
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error — contact support

Rate Limits

Type Limit
Authenticated requests 60 requests / minute
Unauthenticated requests 10 requests / minute

Rate limit headers are included in every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1710000060

When you exceed the limit, the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.

Server:https://app.xcloud.host/api/v1

Production

No authentication selected
Client Libraries

Health (Collapsed)

API health check — no authentication required.

Health Operations

User (Collapsed)

Current authenticated user information and API token management.

Integrations (Collapsed)

Third-party integrations connected to the current team (Cloudflare, etc.). Requires the read:servers scope.

Integrations Operations

Servers (Collapsed)

List and inspect managed servers. Read-only operations require the read:servers scope. Write operations (reboot, site creation) require write:servers.

Servers Operations

Blueprints (Collapsed)

WordPress site blueprints — predefined configurations of themes, plugins, and post-deployment scripts. Use blueprints when creating WordPress sites. Requires the read:servers scope.

Blueprints Operations

Vulnerabilities (Collapsed)

Security vulnerability inventory merged from Patchstack (premium scanner) and Wordfence (built-in scanner). Per-site and team-wide rollup. Ignored entries are excluded by default. Requires the read:sites scope.

PageSpeed (Collapsed)

PageSpeed Insights performance data per site, including Core Web Vitals (LCP, CLS, INP, FCP) and Lighthouse scores. Latest snapshot plus paginated history. Requires the read:sites scope.

WordPress Actions (Collapsed)

Asynchronous WordPress write operations — update plugins/themes/core, with optional pre-update backup. Returns a 202 with an operation UUID for polling. Requires the write:sites scope and the site:manage-update team permission.

SSL Certificates (Collapsed)