Customer API

Green Mini host offers a REST API that lets you manage your servers, invoices, team, and power controls programmatically.

Getting started

1. Create an API token

Go to Profile settings > API Keys in the portal. Give your token a name, pick the team it belongs to, and select only the abilities you actually need.

Copy the token right away. It is only shown once. If you lose it, revoke it and create a new one.

2. Make your first request

Every request goes to https://portal.greenmini.host/api/v1 and needs your token in the Authorization header:

bash

curl https://portal.greenmini.host/api/v1/services \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Accept: application/json"

All requests and responses are JSON. Always include both headers:

Content-Type: application/json
Accept: application/json

Interactive API docs

The full API reference with all endpoints is available at:

portal.greenmini.host/docs/api

You can paste a valid token there to test endpoints directly from your browser. Be aware that this uses the live API. Actions you take there are real.

Example: reboot a server

This is probably the most common API use case. You need a token with the services:power-action ability.

You can identify the server by IP address:

bash

curl -X POST https://portal.greenmini.host/api/v1/services/power \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"action": "reboot", "ip": "203.0.113.10"}'

Or by service ID:

bash

curl -X POST https://portal.greenmini.host/api/v1/services/power \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"action": "reboot", "service": "svc_abc123"}'

Available actions: reboot, power_on, power_off.

Power actions are asynchronous

A reboot request does not block until the server is back up. You get a response with a status field that you can poll:

pending → processing → success (or failed)

Poll the status:

bash

curl https://portal.greenmini.host/api/v1/services/{service_id}/power-requests/{request_id} \
  -H "Authorization: Bearer YOUR_TOKEN_HERE" \
  -H "Accept: application/json"

A completed reboot returns something like:

json

{
  "data": {
    "id": "par_xyz789",
    "action": "reboot",
    "status": "success",
    "requested_at": "2026-03-11T14:30:00+00:00",
    "started_at": "2026-03-11T14:30:01+00:00",
    "completed_at": "2026-03-11T14:30:05+00:00"
  }
}

Questions or missing features?

Email us at support@greenmini.nl or open a ticket in the portal.