HostUpCloudHostUpCloudDocs

API Keys

Generate API keys for programmatic access to the HostUpCloud Console API.

API Keys

API keys allow you to access the HostUpCloud Console API programmatically — perfect for CI/CD pipelines, infrastructure-as-code tools, and custom automation scripts.

Creating an API Key

  1. Go to Settings in the dashboard
  2. Scroll to the API Keys section
  3. Click Create API Key
  4. Enter a name (e.g., "CI/CD Pipeline")
  5. Select permissions: Read, Write, or both
  6. Optionally set an expiration date
  7. Click Create

The full API key is only shown once after creation. Copy and store it securely — you won't be able to see it again.

Using Your API Key

Include the API key in the Authorization header of your requests:

curl -H "Authorization: Bearer huc_your_api_key_here" \
  https://console.hostupcloud.com/api/instances

Example: List Instances

curl -s -H "Authorization: Bearer huc_abc123..." \
  "https://console.hostupcloud.com/api/instances?projectId=YOUR_PROJECT_ID" | jq

Example: Create Instance

curl -X POST \
  -H "Authorization: Bearer huc_abc123..." \
  -H "Content-Type: application/json" \
  -d '{
    "projectId": "your-project-id",
    "name": "my-server",
    "nodeId": "node-id",
    "osTemplate": "Ubuntu 24.04",
    "vcpus": 2,
    "memoryMb": 4096,
    "diskGb": 40
  }' \
  https://console.hostupcloud.com/api/instances

Example: Power Control

# Stop an instance
curl -X POST \
  -H "Authorization: Bearer huc_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"action": "stop"}' \
  https://console.hostupcloud.com/api/instances/INSTANCE_ID/power

Permissions

PermissionAccess
ReadList and view instances, projects, SSH keys, etc.
WriteCreate, modify, delete resources + all read access

Managing Keys

  • Revoke: Disable a key without deleting it (can be re-enabled)
  • Delete: Permanently remove a key
  • Expiry: Set an expiration date — key automatically stops working after

Security Best Practices

  • Never commit API keys to version control
  • Use environment variables or secret managers
  • Set expiration dates for CI/CD keys
  • Use read-only keys when write access isn't needed
  • Revoke keys immediately if compromised
  • Rotate keys periodically

Rate Limits

API key requests are rate-limited to 60 requests per minute. Exceeding this limit returns 429 Too Many Requests.

Next Steps

On this page