Loading Serverfy API Reference...
Serverfy RESTful API provides a high-performance, securely isolated interface per Workspace to provision cloud servers, manage sites, configure databases, and interact with webhooks programmatically.
Cloud server provisioning on DigitalOcean, Hetzner, AWS, Linode, and Vultr, real-time CPU metric tracking, and SSH key management.
Creation of Laravel, Node.js, or static sites, automatic SSL certificates, including custom domains, and zero-downtime deployments.
Provisioning of MySQL, PostgreSQL, and Redis, user credential management, and automatic Instant DB Snapshots before each deploy.
Proactive infrastructure incident diagnosis, root-cause analysis, and supervised Quick Fix proposals (Human-in-the-Loop).
Real-time telemetry, p50/p95/p99 latency, exception aggregation with stack tracing, unified live logs, and Slow Query optimization.
Control servers and deployments in natural language directly from Claude Code, Cursor, Antigravity and modern IDEs.
Base URL: https://serverfy.io/api/v1 Format: application/json (UTF-8) Default: RESTful / JSON Payload
The API has a default limit of 100 requests per minute per Workspace. All responses include X-RateLimit-Limit and X-RateLimit-Remaining headers. Requests exceeding the limit will receive HTTP status 429 Too Many Requests.
| Code | Meaning | Description |
|---|---|---|
200 OK |
Success | The request was processed and returned successfully. |
201 Created |
Created | The resource (server, site, database, or deployment) was created successfully. |
400 Bad Request |
Invalid Request | The request body or submitted parameters are malformed. |
401 Unauthorized |
Unauthorized | API Key (Bearer Token) missing, invalid, or revoked. |
403 Forbidden |
Forbidden | The Workspace lacks sufficient privileges to execute this action on the resource. |
404 Not Found |
Not Found | The requested resource does not exist or does not belong to this Workspace. |
422 Unprocessable |
Validation Error | Required fields missing or failing validation rules. |
429 Rate Limit |
Limit Exceeded | Rate limit of 100 requests per minute per Workspace reached. |
500 Server Error |
Server Error | Internal execution error. Please check server logs or contact support. |
The Serverfy API uses Bearer Tokens (Personal Access Tokens), isolated per Workspace and with strict permission enforcement.
In the application sidebar, click Workspace > API Keys or access it directly from the console.
Click the button "New API Key" at the top of the key list.
Assign a clear name describing the purpose of the integration (e.g.: CI/CD Deployments, Local MCP Agent, Backup Sync).
Copy the token immediately. For security reasons, the full token is only displayed once at the time of creation.
Authorization: Bearer 1|abcdef1234567890abcdef1234567890 Accept: application/json Content-Type: application/json
curl -X GET "https://serverfy.io/api/v1/servers" \ -H "Authorization: Bearer SEU_TOKEN_AQUI" \ -H "Accept: application/json"
If the API key is missing, incorrect, or revoked, the API responds with HTTP status 401:
{ "message": "Unauthenticated." }
Serverfy natively supports the Model Context Protocol (MCP), allowing modern AI assistants — such as Claude Code, Claude Desktop, Cursor, and Antigravity — to connect directly to your Workspace infrastructure.
By enabling the MCP connection, AI models receive strict capabilities (Tools) to inspect metrics, trigger zero-downtime deployments with automatic rollback, and restart services in a safe, auditable, and isolated manner.
In the Serverfy panel, generate a Personal Access Token with appropriate permissions.
The generated token will serve as your Bearer Token for authenticating with the MCP SSE server.
Configure the client by passing the header AUTHORIZATION: Bearer SEU_TOKEN in the environment variables.
To connect Serverfy to Anthropic's Claude, open the configuration file ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows) and add the server via SSE:
{ "mcpServers": { "serverfy": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-sse", "https://serverfy.io/api/v1/mcp/sse" ], "env": { "AUTHORIZATION": "Bearer SEU_TOKEN_AQUI" } } } }
The Serverfy MCP server exposes a complete catalog of granular, secure, and audited tools for AI copilots.
list_serversLists provisioned servers, cloud providers (AWS, DO, Hetzner, Vultr), and connectivity status.
list_sitesLists applications, domains, active branches, runtime, and current status for each workspace site.
deploy_siteTriggers a zero-downtime deployment with automatic rollback on failure.
read_server_metricsGets real-time telemetry for CPU, RAM, disk usage, and historical time series from 1h to 7 days.
restart_workerRestarts the site's background workers without interrupting jobs in progress.
promote_staging_sitePromotes staging environment or ephemeral PR preview to production with database synchronization.
manage_site_cacheConfigures the site's page cache: TTL, bypass for authenticated sessions, and HTTP headers.
purge_fastcgi_cacheInstantly purges the site's page cache without restarting the web server.
manage_site_hibernationHibernates inactive sites or restores them on demand, freeing memory and CPU.
manage_telemetryConfigures log retention, Sense metrics, and percentile latency alerts (p95/p99).
manage_load_balancerManages multi-node upstream pools, load balancing policies (round-robin, least-conn), and health checks.
list_database_replicasQueries read replicas configured for MySQL/PostgreSQL and replication lag (seconds behind master).
create_database_replicaProvisions and synchronizes a new database read replica.
promote_database_replicaPromotes secondary replica to primary node in case of maintenance or failover.
manage_backup_replicationConfigures cross-provider backup replication across multiple S3, Backblaze B2, and Wasabi destinations.
evaluate_dns_failoverChecks Cloudflare/Route53 zone health and performs automatic traffic failover from degraded nodes.
list_centurion_proposalsLists autonomous server optimization proposals generated by Centurion AI Copilot pending approval.
approve_centurion_proposalApproves and executes AI-recommended action plan with full audit tracking.
reject_centurion_proposalDismisses an action proposal and records the reason.
run_centurion_watchdogTriggers an on-demand health scan of the server.
run_compliance_scanRuns a security compliance audit on the server and reports the findings.
remediate_compliance_issueApplies automatic remediation for compliance failures identified in the security report.
With MCP configured in Claude or Cursor, you can ask things like: "Deploy staging site to web-01 server" or "Analyze Nginx error logs from the past 15 minutes and tell me which endpoint is failing".
Unified observability and self-healing for servers and apps: p50/p95/p99 latency telemetry, smart exception tracking, unified live logs, early incident detection, and automated Slow Query optimization.
Continuous incident diagnosis on your servers and actionable Quick Fix recommendations with human approval.
HTTP latency histograms and percentiles (p50, p95, and p99), throughput rate (req/s), and real-time status code grouping with zero overhead.
Finds slow SQL queries and N+1 patterns in your application and suggests how to fix them.
Automatic capture and aggregation of unhandled errors and exceptions with full stack trace, sanitized environment variables, and occurrence history.
Serverfy collects system and application metrics for you. You can also integrate custom monitoring pipelines via authenticated API endpoints:
curl -X POST "https://serverfy.io/api/v1/telemetry/ingest" \ -H "Authorization: Bearer SEU_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "server_id": "srv-01", "metrics": { "cpu_usage": 23.4, "memory_used_mb": 1840, "http_p95_ms": 112 } }'
Centurion never applies structural or destructive changes without explicit authorization. Upon detecting an incident, it identifies the root cause and provides the action for Quick Fix for you to execute with a single click.
Comprehensive infrastructure shielding against data loss and downtime: automatic Instant DB Snapshots before every deploy with instant rollback, cross-cloud replication across multiple storage providers, and intelligent worker autoscaling.
An automatic database restore point before each deploy. If the deploy fails, go back to the exact pre-deploy state with 1 click.
Simultaneous backup distribution across multiple independent providers (AWS S3, Cloudflare R2, and DigitalOcean Spaces), eliminating vendor lock-in.
Queue workers scale up and down automatically to follow your queue load.
SSL certificates issued automatically for the custom domains of your customers in SaaS platforms.
curl -X POST "https://serverfy.io/api/v1/databases/db-prod-01/snapshots" \ -H "Authorization: Bearer SEU_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "pre-migration-v2.5", "replicate_cross_cloud": true }'
Native integration with cloud DNS providers to automate domain validation, A and CAA records, and wildcard routing across all provisioned servers.
Automated record provisioning using dedicated IAM access keys with granular zone-level permissions.
Scoped API tokens restricted to Zone:DNS edit capabilities for enterprise and personal domains.
Direct domain synchronization using DigitalOcean Personal Access Tokens with write privilege.
For security, never use AWS root account keys. Create a dedicated IAM user with specific Route 53 permissions.
Navigate to IAM > Users > Create User. Set username as serverfy-route53 and select Attach policies directly.
Attach the AmazonRoute53FullAccess policy or apply the least-privilege JSON policy shown below.
Under Security Credentials, click Create Access Key. Select Third-party service and copy Access Key ID and Secret Access Key.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "route53:ListHostedZones", "route53:GetHostedZone", "route53:ListResourceRecordSets", "route53:ChangeResourceRecordSets", "route53:GetChange" ], "Resource": "*" } ] }
In Cloudflare, always use a scoped API Token with Zone:DNS Edit and Zone:Zone Settings Edit permissions instead of the Global API Key.
Open dash.cloudflare.com/profile/api-tokens and click Create Token.
Grant Zone > DNS > Edit (to manage A and CAA records) and Zone > Zone Settings > Edit (so Serverfy can keep the SSL settings of the zone working with your sites).
Save the generated token and paste it into Workspace > DNS Providers > Cloudflare.
Generate a Personal Access Token in DigitalOcean with Read and Write permissions to enable full DNS zone management.
Go to cloud.digitalocean.com/account/api/tokens and click Generate New Token.
Set token name (e.g. serverfy-dns) and ensure Write scope is enabled.