Overview

Our API allows you to programmatically manage your servers. All requests should be made to:

https://minecraftprotection.com/dashboard/api.php

All requests require your API Key, which can be generated in the Dashboard.


Authentication

Include your API key in the request parameters as key.


1. List Servers

Retrieve a list of all your protected servers.

GET https://minecraftprotection.com/dashboard/api.php?action=list_servers&key=YOUR_API_KEY
Response Example:
{
    "status": "success",
    "data": [
        {
            "sid": 1,
            "hostname": "play.example.com",
            "origins": [
                {"ip": "1.2.3.4", "port": 25565}
            ]
        }
    ]
}

2. Add Server

Add a new server to your account.

POST https://minecraftprotection.com/dashboard/api.php
Parameters (JSON Body):
{
    "action": "add_server",
    "key": "YOUR_API_KEY",
    "hostname": "play.example.com",
    "origins": [
        { "ip": "1.2.3.4", "port": 25565 }
    ]
}

3. Edit Server

Update an existing server's configuration.

POST https://minecraftprotection.com/dashboard/api.php
Parameters (JSON Body):
{
    "action": "edit_server",
    "key": "YOUR_API_KEY",
    "sid": 1,
    "hostname": "new.example.com",
    "origins": [
        { "ip": "5.6.7.8", "port": 25565 }
    ]
}

4. Delete Server

Remove a server from your account.

POST https://minecraftprotection.com/dashboard/api.php
Parameters (JSON Body):
{
    "action": "delete_server",
    "key": "YOUR_API_KEY",
    "sid": 1
}

Need help? Contact our support team if you have questions about the API.