October Infrastructure Sale · code OCTOBER15 — until 1 Nov See the offer →
Developer Resources

REST API & CLI

Manage instances, power cycles, reverse DNS records, and snapshot backups programmatically.

Base Endpoint: /hostC/api/v1/ • Interactive Docs: View Live API v1 Reference →
All endpoints support JSON envelope responses, real-time database telemetry, and multi-currency pricing contracts.

Authentication

Pass your authorization token as a standard HTTP header with every request:

Authorization: Bearer hc_live_xxxxxxxxxxxxxxxxxxxx

Core API Endpoints

GET /v1/instances

List All Instances

Returns status, assigned IP, node location, and current CPU/RAM utilization metrics.

POST /v1/instances

Deploy New Server

Deploys a new KVM cloud compute slice with chosen OS image and SSH keys in <60s.

POST /v1/instances/{id}/power

Power Controls

Triggers remote ACPI shutdown, instant reboot, or hard power cycle.

POST /v1/instances/{id}/snapshots

Snapshot Management

Creates live NVMe point-in-time snapshots or restores a previous disk state.

Example: Fetch Instances via cURL

# Request:

curl -X GET https://api.hostcraft.xyz/v1/instances \
  -H "Authorization: Bearer $HOSTCRAFT_TOKEN"

Official CLI Tool

You can also control infrastructure directly from your workstation using our lightweight Golang CLI:

# Install via NPM or Binary
npm install -g @hostcraft/cli

# Authenticate and list servers
hostcraft auth login
hostcraft instances list