AFKSystems
DE EN

API access

A small, read-mostly API for your own account. Enough to check on your bots from a script, not enough to do anything a leaked token would regret.

Authentication

Create a token under Settings → Security → API access. Send it with every request as an Authorization header:

Authorization: Bearer <token>

A token authenticates as you, but only for the endpoints below – not for anything a browser session can do.

Endpoints

GET https://afksystems.de/api/me

Your account: credits, plan usage, unread counts.

GET https://afksystems.de/api/profiles

All your server slots, with bot status.

GET https://afksystems.de/api/profiles/:id

One server slot in detail.

POST https://afksystems.de/api/profiles/:id/start

Start the bots on a server slot.

POST https://afksystems.de/api/profiles/:id/stop

Stop the bots on a server slot.

GET https://afksystems.de/api/profiles/:id/events

Connection history of a server slot (joins, disconnects, world changes).

GET https://afksystems.de/api/tickets

Your support tickets.

GET https://afksystems.de/api/tickets/:id

One ticket, with its messages.

POST https://afksystems.de/api/tickets

Open a new support ticket.

GET /api/me

{
  "user": {
    "id": 128,
    "display_name": "Jonas",
    "credits": 340,
    "low_balance_warning": -1
  },
  "stats": {
    "profiles": 2,
    "bots_running": 2,
    "bots_online": 2,
    "monthly_cost": 12,
    "free_slots_left": 0,
    "tickets_unread": 0
  }
}

POST /api/tickets

// Request
{ "subject": "Bot won't reconnect", "body": "It disconnected around 14:00 and hasn't come back." }

// Response
{ "ticket": { "id": 4711, "subject": "Bot won't reconnect", "status": "open", … } }

Errors

Every error comes back as JSON: {"error": "…"}. The HTTP status says what kind: 401 without a valid token, 403 for an endpoint the token may not use, 404 for something that is not yours or does not exist, 429 when a lot of requests arrive at once.