EzServer API

Powerful RESTful API to manage your servers, domains, and DNS programmatically. Build custom integrations and automate your infrastructure.

REST API JSON Secure

Quick Start

Get started with the EzServer API in minutes

1. Get Your API Key

Generate an API key from your dashboard to authenticate your requests.

Get API Key

Base URL

https://api.easyserver.com/v1

Authentication

Authorization: Bearer YOUR_API_KEY

API Endpoints

Complete reference for all available endpoints

Servers

Manage your servers, configurations, and monitoring

GET /servers
POST /servers
GET /servers/{id}
PUT /servers/{id}
DELETE /servers/{id}

Domains

Domain registration and management

GET /domains
POST /domains
GET /domains/{id}
PUT /domains/{id}
DELETE /domains/{id}

DNS

DNS zones and records management

GET /dns/zones
GET /dns/records
POST /dns/records
PUT /dns/records/{id}
DELETE /dns/records/{id}

Code Examples

Real-world examples to get you started

List All Servers

Request

GET /api/v1/servers
Host: api.easyserver.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Response

{
  "data": [
    {
      "id": 1,
      "name": "web-server-01",
      "ip_address": "192.168.1.10",
      "status": "active",
      "type": "vps"
    }
  ],
  "meta": {
    "total": 1
  }
}

Create a New Server

Request

POST /api/v1/servers
Host: api.easyserver.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "name": "api-server-01",
  "ip_address": "192.168.1.20",
  "type": "vps",
  "configuration_id": 2
}

Response

{
  "data": {
    "id": 2,
    "name": "api-server-01",
    "ip_address": "192.168.1.20",
    "status": "pending",
    "type": "vps",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Create DNS Record

Request

POST /api/v1/dns/records
Host: api.easyserver.com
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "zone_id": 1,
  "name": "api",
  "type": "A",
  "content": "192.168.1.20",
  "ttl": 3600
}

Response

{
  "data": {
    "id": 5,
    "name": "api",
    "type": "A",
    "content": "192.168.1.20",
    "ttl": 3600,
    "created_at": "2024-01-15T10:35:00Z"
  }
}

Error Handling

Standard HTTP status codes and error responses

HTTP Status Codes

200 Success
201 Created
400 Bad Request
401 Unauthorized
404 Not Found
500 Server Error

Error Response Format

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid input data",
    "details": {
      "name": [
        "The name field is required."
      ],
      "ip_address": [
        "Invalid IP address format."
      ]
    }
  }
}

Rate Limiting

API Limits

Standard Plan:

1,000 requests per hour

Enterprise Plan:

10,000 requests per hour

Rate limits are enforced per API key. Exceeded limits will return a 429 Too Many Requests status.

SDKs & Libraries

Official and community-maintained libraries

JavaScript

easyserver-js

Python

easyserver-python

PHP

easyserver-php

Go

easyserver-go

Need Help with the API?

Our developer support team is here to help you integrate successfully.