Api

API Reference

Technical reference information for the Suble.io API v2.

API Reference

Technical reference information for the Suble.io API v2.

Error Responses

All API endpoints return consistent error responses with descriptive messages.

Common HTTP Status Codes

Status CodeDescription
200Success - Request completed successfully
400Bad Request - Invalid request parameters or missing required fields
401Unauthorized - Missing or invalid authentication token
403Forbidden - Insufficient permissions for the requested operation
404Not Found - The requested resource does not exist
500Internal Server Error - An unexpected error occurred on the server

Error Response Format

All error responses follow this consistent format:

{
  "error": "Descriptive error message explaining what went wrong"
}

Permission-Based Errors

Some endpoints require specific permissions. Common permission-based error:

{
  "error": "Insufficient permissions to access this resource"
}

Common Error Messages

Error MessageCauseSolution
"Invalid fullname, email, password or country"Registration validation failedCheck all required fields are valid
"Invalid email or password."Login credentials incorrectVerify credentials and try again
"Project not found"Project ID doesn't exist or no accessCheck project ID and permissions
"Error, vps is already online."VM already in requested stateCheck VM status before operation
"Error, the vps must be offline to rebuild."VM must be stopped for rebuildStop VM before rebuilding
"Error, only hourly billing can be deleted"Subscription VMs cannot be deletedCancel subscription instead

Rate Limiting

API requests are subject to rate limiting to ensure fair usage and system stability.

Rate Limit Response

If you exceed the rate limit, you'll receive a 429 Too Many Requests response:

{
  "error": "Rate limit exceeded. Please try again later."
}

Rate Limit Headers

All API responses include rate limiting information in the headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per time window
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when the rate limit resets

Best Practices

  • Respect Limits: Stay within the rate limits to avoid being throttled
  • Implement Backoff: Use exponential backoff when receiving 429 responses
  • Cache Responses: Cache responses when possible to reduce API calls
  • Batch Operations: Group related operations when the API supports it

Authentication

Token Types

Token TypePurposeLifespan
Access TokenAPI requestsShort-lived (15-60 minutes)
Refresh TokenRenewing access tokensLong-lived (30 days)

Permission Levels

Different endpoints require different permission levels:

PermissionDescription
READ_VPSView VM information and status
VPS_CONTROLStart, stop, reboot VMs
WRITE_VPSModify VM settings
VPS_DELETEDelete or rebuild VMs
READ_NETWORKView network configuration
WRITE_NETWORKModify network settings
READ_FIREWALLView firewall rules
WRITE_FIREWALLModify firewall rules
CONSOLE_VNCAccess VM console
READ_MEMBERSView project members
WRITE_MEMBERSManage project members
READ_SSHKEYSView SSH keys
WRITE_SSHKEYSManage SSH keys
ORDER_PRODUCTCreate and resize VMs

Data Formats

Date/Time Format

All timestamps use ISO 8601 format in UTC:

{
  "created": "2025-01-15T10:30:00Z"
}

Currency Format

All monetary values are in the account's base currency (typically DKK):

{
  "price": 49.00,
  "cost": 148.50
}

IP Address Format

IPv4 addresses are returned as strings:

{
  "ipv4": "192.121.119.100"
}

IPv6 addresses include the prefix:

{
  "ipv6": "2001:67c:bec:b::100/64"
}

Regional Information

Supported Countries

CountryCodePayment Methods
DenmarkDKMobilePay, Nets
NorwayNOMobilePay, Nets
SwedenSEMobilePay, Nets
FinlandFIMobilePay, Nets

Data Centers

LocationCodeDescription
Copenhagenar5Primary data center in Denmark

Support

Support Channels

For API support, questions, or feature requests:

Response Times

Support TierResponse Time
Basic24-48 hours
Standard12-24 hours
Premium2-8 hours

What to Include

When contacting support, please include:

  1. Request ID: From API response headers (if applicable)
  2. Timestamp: When the issue occurred
  3. Endpoint: Which API endpoint you were calling
  4. Request: The request you sent (remove sensitive data)
  5. Response: The error response you received
  6. Expected Behavior: What you expected to happen