Cafora Docs
Developer

Servers API

Manage your Cafora servers through the API.

The Servers API provides endpoints for managing your Minecraft server instances.

Base URL

https://api.caforahost.com/v1

Endpoints

Get Server Info

GET /v1/servers/{server_id}

Returns current server status, resource usage, and configuration.

List Servers

GET /v1/servers

Returns a list of all servers on your account.

Power Actions

POST /v1/servers/{server_id}/power

Send power actions: start, stop, restart, kill.

Send Command

POST /v1/servers/{server_id}/command

Execute a console command on the server.

Example: Get Server Status

import requests

API_KEY = "your-api-key"
SERVER_ID = "your-server-id"

headers = {"Authorization": f"Bearer {API_KEY}"}

response = requests.get(
    f"https://api.caforahost.com/v1/servers/{SERVER_ID}",
    headers=headers
)

data = response.json()
print(f"Server status: {data['status']}")
print(f"Players online: {data['players']}")

Error Responses

StatusMeaning
200Success
401Invalid API key
404Server not found
429Rate limit exceeded
500Server error

On this page