AI ready
Open in Claude (opens in a new tab)View as Markdown

Overview and quickstart

What the Clouduxe API does and the rules every request follows, then your first call and a VPS restart in three steps.

Updated 5 November 20262 min read

On this page
  1. The rules every request follows
  2. Quickstart: restart a VPS in three steps
  3. What happened on the wire
  4. Where to go next

The Clouduxe API lets your own code run your Clouduxe services: order, manage and automate VPS, Dedicated servers and the DDoS-protected proxy without the panel. It speaks JSON over HTTPS, and every request goes to one base URL, which holds the major version:

https://api.clouduxe.com/v1

The rules every request follows

WhatHow it works
TokensA bearer token in the Authorization header. Live tokens start with cxk_live_. Each token belongs to one account and carries only the scopes you gave it.
Names and idsFields and parameters are camelCase. Ids are opaque UUIDs, and every object says what it is in object.
ListsCursor pagination: a page says whether another follows in hasMore, and hands you nextCursor to fetch it.
ErrorsOne error shape, with a stable code, a type to group it and a requestId to quote to support.
WritesWrites need an Idempotency-Key, so a retry never runs the same write twice. The reference shows the header on every operation that takes it.
Rate limitsEvery response carries RateLimit-* headers for the limit nearest to running out.
Long-running workA restart, a reinstall or a new server does not hold your request open: you get an action back at once and read it until it finishes.
VersionsThe path holds the major version, /v1, and nothing in /v1 is ever removed or renamed: new fields, endpoints and event types only. You do not need a version header. To pin a dated version anyway, send Clouduxe-Version: 2026-12-01; without it, the token's own version is used.

Quickstart: restart a VPS in three steps

The three steps below are a complete program: find a VPS, restart it, and see the restart finish. Every request on this page switches between curl, the Node and PHP SDKs, Python and plain fetch, and remembers the one you pick.

  1. Create a token and keep it out of your code

    Tokens are made only in the panel, at API tokens, never through the API. Making one asks you to confirm it is you (a passkey, or an email code from the last 10 minutes), and the token is shown once, so copy it then. For this quickstart, give it services:read and services:write.

    Put the token in an environment variable. Every example in these docs reads it from CLOUDUXE_API_KEY, so you can paste them as they are.

    Shell
    export CLOUDUXE_API_KEY="cxk_live_..."
  2. Make your first call

    List your services. The answer is one page of them; note the id of the VPS you want to restart.

    GET/servicesReference

    List servicesLanguage
    curl https://api.clouduxe.com/v1/services \
      -H "Authorization: Bearer $CLOUDUXE_API_KEY"
    200 example
    {
      "object": "list",
      "data": [
        {
          "object": "service",
          "id": "c3a1f6d2-8b4e-4a9c-b7d5-2e1f0a3c6b8d",
          "type": "vps",
          "status": "active",
          "suspensionReason": null,
          "deletesAt": null,
          "planId": "vps-nvme-4-mumbai",
          "planName": "NVMe VPS 4 GB",
          "region": "mumbai",
          "label": "node1",
          "reference": "client-4471",
          "metadata": {
            "whmcsServiceId": "18342",
            "plan": "starter"
          },
          "firewallAvailable": true,
          "billing": {
            "cycleMonths": 1,
            "price": {
              "amount": 129900,
              "currency": "INR"
            },
            "currentPeriodStart": "2026-12-04",
            "paidThrough": "2027-01-03",
            "cancelAtPeriodEnd": false,
            "endsOn": null
          },
          "server": {
            "powerState": "running",
            "hostname": "node1.acme.example",
            "ipv4": [
              "203.0.113.24"
            ],
            "ipv6": [
              "2001:db8:4f2a::24"
            ],
            "image": {
              "object": "image",
              "id": "ubuntu-24.04",
              "name": "Ubuntu 24.04 LTS",
              "family": "linux"
            },
            "resources": {
              "cpuCores": 2,
              "memoryMb": 4096,
              "diskGb": 80,
              "trafficGb": 4000
            },
            "statusUpdatedAt": "2026-12-04T10:02:41Z",
            "stale": false
          },
          "proxy": null,
          "createdAt": "2026-12-04T09:15:24Z",
          "livemode": true
        },
        {
          "object": "service",
          "id": "4e9b2d7a-1c6f-4b3e-a8d2-7f5c0e9a1b4d",
          "type": "dedicated",
          "status": "provisioning",
          "suspensionReason": null,
          "deletesAt": null,
          "planId": "dedicated-e5-64-limburg",
          "planName": "Dedicated E5 64 GB",
          "region": "limburg",
          "label": "db-primary",
          "reference": "client-4471",
          "metadata": {},
          "firewallAvailable": false,
          "billing": {
            "cycleMonths": 1,
            "price": {
              "amount": 1149900,
              "currency": "INR"
            },
            "currentPeriodStart": "2026-12-04",
            "paidThrough": "2027-01-03",
            "cancelAtPeriodEnd": false,
            "endsOn": null
          },
          "server": {
            "powerState": "unknown",
            "hostname": "db1.acme.example",
            "ipv4": [],
            "ipv6": [],
            "image": null,
            "resources": null,
            "statusUpdatedAt": null,
            "stale": false
          },
          "proxy": null,
          "createdAt": "2026-12-03T14:40:05Z",
          "livemode": true
        },
        {
          "object": "service",
          "id": "a7d4c1e9-3f2b-4d8a-9c6e-0b5a2f7d3e1c",
          "type": "proxy",
          "status": "active",
          "suspensionReason": null,
          "deletesAt": null,
          "planId": "proxy-game-standard",
          "planName": "Protected Proxy Standard",
          "region": null,
          "label": "game-proxy",
          "reference": "client-5102",
          "metadata": {},
          "firewallAvailable": false,
          "billing": {
            "cycleMonths": 1,
            "price": {
              "amount": 249900,
              "currency": "INR"
            },
            "currentPeriodStart": "2026-12-04",
            "paidThrough": "2027-01-03",
            "cancelAtPeriodEnd": false,
            "endsOn": null
          },
          "server": null,
          "proxy": {
            "profile": "fivem",
            "ports": [
              {
                "protocol": "tcp",
                "portStart": 30120,
                "portEnd": 30120
              },
              {
                "protocol": "udp",
                "portStart": 30120,
                "portEnd": 30120
              }
            ]
          },
          "createdAt": "2026-11-28T11:02:19Z",
          "livemode": true
        }
      ],
      "hasMore": true,
      "nextCursor": "eyJsIjoic2VydmljZXMiLCJjIjoiMjAyNi0xMi0wNFQwOToxNToyMloifQ.x7Hq2N"
    }

    Other responses

    400Bad requestcursor_invalid, version_invalid, parameter_invalid
    {
      "error": {
        "type": "invalid_request_error",
        "code": "cursor_invalid",
        "message": "The cursor is malformed, has expired, or belongs to a list with other filters.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#cursor_invalid"
      }
    }

    Also answered with this status: version_invalid, parameter_invalid.

    401Unauthorizedtoken_missing, token_invalid, token_expired, token_revoked
    {
      "error": {
        "type": "authentication_error",
        "code": "token_missing",
        "message": "No API token was sent. Send it as Authorization: Bearer <token>.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#token_missing"
      }
    }

    Also answered with this status: token_invalid, token_expired, token_revoked.

    403Forbiddenip_not_allowed, api_access_disabled, scope_missing
    {
      "error": {
        "type": "permission_error",
        "code": "ip_not_allowed",
        "message": "This request came from an address outside the token's IP allowlist.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#ip_not_allowed"
      }
    }

    Also answered with this status: api_access_disabled, scope_missing.

    429Too many requestsrate_limited
    {
      "error": {
        "type": "rate_limit_error",
        "code": "rate_limited",
        "message": "Too many requests.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#rate_limited"
      }
    }
    500Server errorinternal_error
    {
      "error": {
        "type": "api_error",
        "code": "internal_error",
        "message": "An unexpected error occurred. It has been logged with this request id.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#internal_error"
      }
    }
    503Unavailableunavailable
    {
      "error": {
        "type": "api_error",
        "code": "unavailable",
        "message": "The API is briefly unavailable.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#unavailable"
      }
    }
  3. Restart the VPS, then read the action

    Send the restart. The API answers straight away with an action, and the restart carries on in the background.

    POST/services/{serviceId}/powerReference

    Run a power actionLanguage
    curl -X POST https://api.clouduxe.com/v1/services/c3a1f6d2-8b4e-4a9c-b7d5-2e1f0a3c6b8d/power \
      -H "Authorization: Bearer $CLOUDUXE_API_KEY" \
      -H "Idempotency-Key: 6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f" \
      -H "Content-Type: application/json" \
      -d '{"action":"restart"}'
    202 example
    {
      "object": "action",
      "id": "f5c8b2a1-6e3d-4c9f-b1a7-3d2e9c0f4b6a",
      "type": "restart",
      "status": "running",
      "serviceId": "c3a1f6d2-8b4e-4a9c-b7d5-2e1f0a3c6b8d",
      "orderId": null,
      "invoiceId": null,
      "failure": null,
      "secretAvailable": false,
      "secretExpiresAt": null,
      "createdAt": "2026-12-04T09:20:11Z",
      "startedAt": "2026-12-04T09:20:11Z",
      "completedAt": null,
      "livemode": true
    }

    Other responses

    400Bad requestversion_invalid, idempotency_key_required, idempotency_key_invalid, invalid_json, parameter_missing, parameter_invalid, parameter_unknown
    {
      "error": {
        "type": "invalid_request_error",
        "code": "version_invalid",
        "message": "Clouduxe-Version does not name an API version.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#version_invalid"
      }
    }

    Also answered with this status: idempotency_key_required, idempotency_key_invalid, invalid_json, parameter_missing, parameter_invalid, parameter_unknown.

    401Unauthorizedtoken_missing, token_invalid, token_expired, token_revoked
    {
      "error": {
        "type": "authentication_error",
        "code": "token_missing",
        "message": "No API token was sent. Send it as Authorization: Bearer <token>.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#token_missing"
      }
    }

    Also answered with this status: token_invalid, token_expired, token_revoked.

    403Forbiddenforbidden, ip_not_allowed, api_access_disabled, scope_missing
    {
      "error": {
        "type": "permission_error",
        "code": "forbidden",
        "message": "Your role on this service does not allow this action.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#forbidden"
      }
    }

    Also answered with this status: ip_not_allowed, api_access_disabled, scope_missing.

    404Not foundnot_found
    {
      "error": {
        "type": "not_found_error",
        "code": "not_found",
        "message": "No such object, or it is not visible to this token.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#not_found"
      }
    }
    409Conflictservice_not_ready, service_building, idempotency_in_progress
    {
      "error": {
        "type": "conflict_error",
        "code": "service_not_ready",
        "message": "This service is still being set up.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#service_not_ready"
      }
    }

    Also answered with this status: service_building, idempotency_in_progress.

    413Too largerequest_too_large
    {
      "error": {
        "type": "invalid_request_error",
        "code": "request_too_large",
        "message": "The request body is larger than 1 MiB.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#request_too_large"
      }
    }
    415Unsupported media typeunsupported_media_type
    {
      "error": {
        "type": "invalid_request_error",
        "code": "unsupported_media_type",
        "message": "The request body must be application/json.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#unsupported_media_type"
      }
    }
    422Unprocessableidempotency_mismatch
    {
      "error": {
        "type": "idempotency_error",
        "code": "idempotency_mismatch",
        "message": "This Idempotency-Key was already used with a different request.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#idempotency_mismatch"
      }
    }
    423Lockedservice_locked, service_unconfirmed
    {
      "error": {
        "type": "conflict_error",
        "code": "service_locked",
        "message": "This service is suspended, cancelled or terminated.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#service_locked"
      }
    }

    Also answered with this status: service_unconfirmed.

    429Too many requestsaction_limit_reached, rate_limited
    {
      "error": {
        "type": "rate_limit_error",
        "code": "action_limit_reached",
        "message": "This service has reached its limit for this action.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#action_limit_reached"
      }
    }

    Also answered with this status: rate_limited.

    500Server errorinternal_error
    {
      "error": {
        "type": "api_error",
        "code": "internal_error",
        "message": "An unexpected error occurred. It has been logged with this request id.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#internal_error"
      }
    }
    503Unavailableactions_unavailable, platform_unavailable, unavailable, outcome_unknown, limits_unavailable
    {
      "error": {
        "type": "api_error",
        "code": "actions_unavailable",
        "message": "Server actions are paused for a moment.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#actions_unavailable"
      }
    }

    Also answered with this status: platform_unavailable, unavailable, outcome_unknown, limits_unavailable.

    Read the action back by its id until its status is terminal: succeeded, failed or unknown. Poll at most once every 2 seconds.

    GET/actions/{actionId}Reference

    Get an actionLanguage
    curl https://api.clouduxe.com/v1/actions/f5c8b2a1-6e3d-4c9f-b1a7-3d2e9c0f4b6a \
      -H "Authorization: Bearer $CLOUDUXE_API_KEY"
    200 example
    {
      "object": "action",
      "id": "f5c8b2a1-6e3d-4c9f-b1a7-3d2e9c0f4b6a",
      "type": "restart",
      "status": "succeeded",
      "serviceId": "c3a1f6d2-8b4e-4a9c-b7d5-2e1f0a3c6b8d",
      "orderId": null,
      "invoiceId": null,
      "failure": null,
      "secretAvailable": false,
      "secretExpiresAt": null,
      "createdAt": "2026-12-04T09:20:11Z",
      "startedAt": "2026-12-04T09:20:11Z",
      "completedAt": "2026-12-04T09:20:39Z",
      "livemode": true
    }

    Other responses

    400Bad requestversion_invalid
    {
      "error": {
        "type": "invalid_request_error",
        "code": "version_invalid",
        "message": "Clouduxe-Version does not name an API version.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#version_invalid"
      }
    }
    401Unauthorizedtoken_missing, token_invalid, token_expired, token_revoked
    {
      "error": {
        "type": "authentication_error",
        "code": "token_missing",
        "message": "No API token was sent. Send it as Authorization: Bearer <token>.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#token_missing"
      }
    }

    Also answered with this status: token_invalid, token_expired, token_revoked.

    403Forbiddenip_not_allowed, api_access_disabled, scope_missing
    {
      "error": {
        "type": "permission_error",
        "code": "ip_not_allowed",
        "message": "This request came from an address outside the token's IP allowlist.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#ip_not_allowed"
      }
    }

    Also answered with this status: api_access_disabled, scope_missing.

    404Not foundnot_found
    {
      "error": {
        "type": "not_found_error",
        "code": "not_found",
        "message": "No such object, or it is not visible to this token.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#not_found"
      }
    }
    429Too many requestsrate_limited
    {
      "error": {
        "type": "rate_limit_error",
        "code": "rate_limited",
        "message": "Too many requests.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#rate_limited"
      }
    }
    500Server errorinternal_error
    {
      "error": {
        "type": "api_error",
        "code": "internal_error",
        "message": "An unexpected error occurred. It has been logged with this request id.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#internal_error"
      }
    }
    503Unavailableunavailable
    {
      "error": {
        "type": "api_error",
        "code": "unavailable",
        "message": "The API is briefly unavailable.",
        "param": null,
        "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
        "docUrl": "https://docs.clouduxe.com/api/errors#unavailable"
      }
    }

What happened on the wire

Two kinds of request did the work: one that started the restart and one that asked how it was going. The request that starts the work never waits for it, so a slow restart cannot time out your code.

The power request answers at once with an action, and the restart runs on our side while your code is free. Reading the action back shows where it is; the same action id ties the two calls together. Derived from the reference: Run a power action and Retrieve an action.

Where to go next

Need a server, or a hand with one?

Pick a plan to deploy a server, or open a ticket in the panel. Support runs 24/7/365.