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
- Go to Settings in the dashboard
- Scroll to the API Keys section
- Click Create API Key
- Enter a name (e.g., "CI/CD Pipeline")
- Select permissions: Read, Write, or both
- Optionally set an expiration date
- 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/instancesExample: List Instances
curl -s -H "Authorization: Bearer huc_abc123..." \
"https://console.hostupcloud.com/api/instances?projectId=YOUR_PROJECT_ID" | jqExample: 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/instancesExample: 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/powerPermissions
| Permission | Access |
|---|---|
| Read | List and view instances, projects, SSH keys, etc. |
| Write | Create, 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
- Deploy a Cloud Compute instance via the API
- Attach Floating IPs programmatically
- Configure Block Storage volumes via API
- Review Security & Compliance for best practices