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 Code | Description |
---|---|
200 | Success - Request completed successfully |
400 | Bad Request - Invalid request parameters or missing required fields |
401 | Unauthorized - Missing or invalid authentication token |
403 | Forbidden - Insufficient permissions for the requested operation |
404 | Not Found - The requested resource does not exist |
500 | Internal 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 Message | Cause | Solution |
---|---|---|
"Invalid fullname, email, password or country" | Registration validation failed | Check all required fields are valid |
"Invalid email or password." | Login credentials incorrect | Verify credentials and try again |
"Project not found" | Project ID doesn't exist or no access | Check project ID and permissions |
"Error, vps is already online." | VM already in requested state | Check VM status before operation |
"Error, the vps must be offline to rebuild." | VM must be stopped for rebuild | Stop VM before rebuilding |
"Error, only hourly billing can be deleted" | Subscription VMs cannot be deleted | Cancel 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:
Header | Description |
---|---|
X-RateLimit-Limit | Maximum requests per time window |
X-RateLimit-Remaining | Remaining requests in current window |
X-RateLimit-Reset | Unix 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 Type | Purpose | Lifespan |
---|---|---|
Access Token | API requests | Short-lived (15-60 minutes) |
Refresh Token | Renewing access tokens | Long-lived (30 days) |
Permission Levels
Different endpoints require different permission levels:
Permission | Description |
---|---|
READ_VPS | View VM information and status |
VPS_CONTROL | Start, stop, reboot VMs |
WRITE_VPS | Modify VM settings |
VPS_DELETE | Delete or rebuild VMs |
READ_NETWORK | View network configuration |
WRITE_NETWORK | Modify network settings |
READ_FIREWALL | View firewall rules |
WRITE_FIREWALL | Modify firewall rules |
CONSOLE_VNC | Access VM console |
READ_MEMBERS | View project members |
WRITE_MEMBERS | Manage project members |
READ_SSHKEYS | View SSH keys |
WRITE_SSHKEYS | Manage SSH keys |
ORDER_PRODUCT | Create 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
Country | Code | Payment Methods |
---|---|---|
Denmark | DK | MobilePay, Nets |
Norway | NO | MobilePay, Nets |
Sweden | SE | MobilePay, Nets |
Finland | FI | MobilePay, Nets |
Data Centers
Location | Code | Description |
---|---|---|
Copenhagen | ar5 | Primary data center in Denmark |
Support
Support Channels
For API support, questions, or feature requests:
- 📚 Documentation: https://docs.suble.io
- 🎧 Support Portal: https://support.suble.io
- 📊 Status Page: https://status.suble.io
Response Times
Support Tier | Response Time |
---|---|
Basic | 24-48 hours |
Standard | 12-24 hours |
Premium | 2-8 hours |
What to Include
When contacting support, please include:
- Request ID: From API response headers (if applicable)
- Timestamp: When the issue occurred
- Endpoint: Which API endpoint you were calling
- Request: The request you sent (remove sensitive data)
- Response: The error response you received
- Expected Behavior: What you expected to happen
Related Topics
- Authentication - How to authenticate with the API
- Projects - Understanding project structure
- Virtual Machines - Working with VMs
- Billing & Profile - Managing billing and payment