Hosting Endpoints
Deploy and manage websites and applications with global CDN and automatic SSL
Global static site hosting with automatic deployments from Git repositories. Support for popular frameworks and custom build commands.
Frameworks
Features
Performance
99.9% Uptime, Global Edge NetworkQuick Actions
Deploy a new site directly from your Git repository with automatic builds.
POST /hosting/sitesConfigure custom domains with automatic SSL certificate provisioning.
PUT /hosting/sites/:idManually trigger deployments or set up automatic deployments on push.
POST /hosting/sites/:id/deploySupported Frameworks
React
Create React App, Vite, Custom builds
npm run buildNext.js
Static export, Server-side generation
npm run build && npm run exportVue.js
Vue CLI, Vite, Nuxt.js static
npm run buildAngular
Angular CLI, Universal
ng build --prodAPI Endpoints
/hosting/sitesResponse
{
"success": true,
"sites": [
{
"id": "site_123",
"name": "my-website",
"domain": "my-website.com",
"status": "active",
"ssl_enabled": true,
"region": "global",
"framework": "nextjs",
"created_at": "2024-01-15T10:30:00Z",
"last_deployment": "2024-12-02T14:20:00Z",
"url": "https://my-website.com",
"preview_url": "https://preview-abc123.vpnenterprise.app",
"git_repo": "https://github.com/user/my-website",
"branch": "main"
}
],
"total": 1,
"page": 1,
"limit": 20
}/hosting/sitesRequest Body
{
"name": "my-portfolio",
"domain": "portfolio.example.com",
"git_repo": "https://github.com/user/portfolio.git",
"branch": "main",
"framework": "react",
"build_command": "npm run build",
"output_directory": "dist",
"environment_variables": {
"NODE_ENV": "production",
"API_URL": "https://api.example.com"
}
}/hosting/sites/:idResponse
{
"success": true,
"site": {
"id": "site_123",
"name": "my-website",
"domain": "my-website.com",
"status": "active",
"ssl_enabled": true,
"region": "global",
"framework": "nextjs",
"created_at": "2024-01-15T10:30:00Z",
"last_deployment": "2024-12-02T14:20:00Z",
"git_repo": "https://github.com/user/my-website",
"branch": "main",
"build_settings": {
"build_command": "npm run build",
"output_directory": "out",
"node_version": "18"
},
"metrics": {
"requests_24h": 12450,
"bandwidth_24h": "156MB",
"uptime": "99.9%"
}
}
}/hosting/sites/:idRequest Body
{
"domain": "new-domain.com",
"branch": "production",
"environment_variables": {
"API_URL": "https://api.production.com"
}
}/hosting/sites/:idResponse
{
"success": true,
"message": "Site deleted successfully",
"id": "site_123",
"domain": "my-website.com"
}/hosting/sites/:id/deployRequest Body
{
"branch": "main",
"message": "Manual deployment trigger"
}/hosting/sites/:id/deploymentsResponse
{
"success": true,
"deployments": [
{
"id": "dep_456",
"status": "success",
"branch": "main",
"commit": "abc123def456",
"message": "Update homepage content",
"started_at": "2024-12-02T14:20:00Z",
"completed_at": "2024-12-02T14:23:00Z",
"duration": "3m 15s"
}
],
"total": 25
}Deployment Status
Success
Site deployed successfully and is live
Building
Build process is currently running
Queued
Deployment is queued and waiting to start
Failed
Build or deployment failed with errors
Configure environment variables for your deployments. These are injected during the build process.
{
"environment_variables": {
"NODE_ENV": "production",
"API_URL": "https://api.mysite.com",
"ANALYTICS_ID": "GA-XXXXXXXXX"
}
}Security Note: Avoid storing sensitive data in environment variables for client-side builds, as they become part of the public bundle.