Reinstall a server
/services/{serviceId}/reinstallUse this to rebuild a VPS with a new OS, hostname and, for owner tokens, your SSH keys. Everything on the disk is lost. Answers an action that runs for several minutes. When the build sets a password (always for Windows, and when no SSH key is given), the action's secret holds it once it succeeds: retrieve it with getActionSecret within 60 minutes, up to 5 times. If the outcome is unknown, another reinstall is refused for up to 15 minutes. Limited to 5 per service per hour.
- Token
- Bearer API token: cxk_live_ followed by 46 letters and digits
- Scope
services:destructive- Header
Authorization: Bearer $CLOUDUXE_API_KEY
How tokens and scopes work: Authentication and scopes.
serviceIdstring (uuid)RequiredThe service's id.
Clouduxe-VersionstringOptionalThe API version to use, such as 2026-12-01. Omit it to use your token's version.
pattern ^[0-9]{4}-[0-9]{2}-[0-9]{2}$Idempotency-KeystringRequiredA unique key for this logical request, 1 to 128 characters of letters, digits, underscore, dot, colon or hyphen; a UUID is best. Retrying with the same key is safe: the change happens once and the retry gets the same answer. Keys are kept 48 hours.
pattern ^[A-Za-z0-9_.:-]{1,128}$
Body
RequiredimageIdstringRequiredThe image to install, from listServiceImages.
hostnamestringRequiredThe server's new hostname. RFC 1123 labels of 1 to 63 letters, digits and hyphens, no label starting or ending with a hyphen, 253 characters in all, no trailing dot. Single-label names (such as node1) and names that look like an IP address (such as 1.2.3.4: the last label must hold a letter) are refused. Stored in lower case.
max length 253, pattern ^(?=.{1,253}$)(?=.*[A-Za-z][A-Za-z0-9-]*$)[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$sshKeyIdsarray of string (uuid)OptionalSSH keys from your library to install for root. At most 10. Owner tokens only: a delegate's token must leave this empty.
max items 10
202Accepted The action, started.
objectstringRequiredThe object's type. Always "action".
idstring (uuid)RequiredThe action's id.
typestringRequiredWhat the action does.
One ofbootshutdownrestartpoweroffreinstallreset_passwordplan_changeterminateprovisionstatusstringRequiredqueued (recorded, not started; provisioning of a dedicated server or a proxy can stay here for hours while staff set it up), running (sent; waiting for the server to show the result), succeeded, failed, or unknown (the platform's answer was lost and the result was not confirmed in time; check the service). succeeded, failed and unknown are final and never change.
One ofqueuedrunningsucceededfailedunknownserviceIdstring (uuid) or nullRequiredThe service the action acts on. Null for a provision action until its service exists.
orderIdstring (uuid) or nullRequiredThe order a provision action belongs to, or null.
invoiceIdstring (uuid) or nullRequiredThe invoice a plan change created, or null.
failureobject or nullRequiredSet when status is failed; otherwise null.
Show 2 child attributesHide 2 child attributes
codestringRequiredplatform_refused, platform_unavailable, provisioning_failed (staff are notified and will contact you), order_rejected (the order failed review; its payment returns to wallet credit), order_cancelled or service_locked.
One ofplatform_refusedplatform_unavailableprovisioning_failedorder_rejectedorder_cancelledservice_lockedmessagestringRequiredA sentence for a person.
secretAvailablebooleanRequiredTrue while a secret this action set (a root or Administrator password) can be read with getActionSecret. Only the account owner's tokens can read it. It turns false when you delete it, after 5 reads, or when it expires.
secretExpiresAtstring (date-time) or nullRequiredWhen the secret is deleted unread or not (60 minutes after the action succeeded), or null when there is none.
createdAtstring (date-time)RequiredWhen the action was requested.
startedAtstring (date-time) or nullRequiredWhen it was sent to the platform, or null while queued.
completedAtstring (date-time) or nullRequiredWhen it reached a final status, or null.
livemodebooleanRequiredTrue for objects of your live account.
Every response
- 202AcceptedThe action, started.
- 400Bad requestThe request is not valid. Codes: version_invalid, idempotency_key_required, idempotency_key_invalid, invalid_json, parameter_missing, parameter_invalid, parameter_unknown.
- 401UnauthorizedAuthentication failed. Codes: token_missing, token_invalid, token_expired, token_revoked.
- 403ForbiddenThe token is not allowed to do this. Codes: forbidden, ssh_keys_not_allowed, ip_not_allowed, api_access_disabled, scope_missing.
- 404Not foundNot found. Codes: not_found.
- 409ConflictThe request conflicts with the object's current state. Codes: service_not_ready, service_building, reinstall_in_doubt, idempotency_in_progress.
- 413Too largeThe request body is too large. Codes: request_too_large.
- 415Unsupported media typeUnsupported media type. Codes: unsupported_media_type.
- 422UnprocessableThe request is well formed but cannot be carried out. Codes: image_unavailable, hostname_invalid, ssh_key_unknown, too_many_ssh_keys, idempotency_mismatch.
- 423The service is locked. Codes: service_locked, service_unconfirmed.
- 429Too many requestsA rate limit was reached. Codes: action_limit_reached, rate_limited.
- 500Server errorUnexpected error. Codes: internal_error.
- 503UnavailableTemporarily unavailable. Codes: actions_unavailable, platform_unavailable, unavailable, outcome_unknown, limits_unavailable.