{"openapi":"3.1.0","info":{"title":"Tacyon API","version":"1.0.0","description":"Control your Minecraft servers programmatically. Authenticate every request with a Bearer API key (Developers → API keys). The same key works for the REST API, the MCP server (/api/mcp), and the Discord bot."},"servers":[{"url":"https://portal.tacyon.io","description":"Production"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"tcy_…","description":"A Tacyon API key. A key only ever has its owner’s permissions, narrowed by its scopes + server allowlist."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"}}},"Server":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"hostname":{"type":"string"},"region":{"type":"string","enum":["us-east","us-west"]},"run_state":{"type":"string","example":"RUNNING"},"edition":{"type":"string","enum":["java","bedrock"]},"server_type":{"type":"string","example":"PAPER"},"minecraft_version":{"type":"string","example":"1.21"},"ram_mb":{"type":"integer"},"disk_mb":{"type":"integer"}}}}},"paths":{"/api/servers":{"get":{"summary":"List your team’s servers","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"servers":{"type":"array","items":{"$ref":"#/components/schemas/Server"}}}}}}},"401":{"description":"Missing/invalid key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create a server","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","edition","region","hostname","ram_mb","disk_mb"],"properties":{"name":{"type":"string"},"edition":{"type":"string","enum":["java","bedrock"]},"region":{"type":"string","enum":["us-east","us-west"]},"hostname":{"type":"string"},"template_id":{"type":"string","format":"uuid"},"ram_mb":{"type":"integer"},"disk_mb":{"type":"integer"},"minecraft_version":{"type":"string"},"online_mode":{"type":"boolean"}}}}}},"responses":{"201":{"description":"Created"},"402":{"description":"Out of credit"}}}},"/api/servers/{id}":{"get":{"summary":"Get one server","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Server"}}}},"404":{"description":"Not found"}}},"patch":{"summary":"Update settings (RAM/disk, profile, version, software, online mode)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ram_mb_limit":{"type":"integer"},"disk_mb_limit":{"type":"integer"},"memory_profile":{"type":"string","enum":["lean","balanced","ultra"]},"minecraft_version":{"type":"string"},"server_type":{"type":"string"},"online_mode":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK"}}},"delete":{"summary":"Delete a server","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}}},"/api/servers/{id}/power":{"post":{"summary":"Start, stop, restart or kill","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["start","stop","restart","kill"]}}}}}},"responses":{"200":{"description":"OK"},"403":{"description":"Key lacks the power scope"}}}},"/api/servers/{id}/command":{"post":{"summary":"Run a console (RCON) command","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["command"],"properties":{"command":{"type":"string","example":"whitelist add Notch"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"output":{"type":"string"},"used_rcon":{"type":"boolean"}}}}}}}}},"/api/servers/{id}/files":{"get":{"summary":"List a directory","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"path","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/api-keys":{"get":{"summary":"List your API keys (redacted)","responses":{"200":{"description":"OK"}}},"post":{"summary":"Create an API key (returns the secret ONCE)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"},"description":"subset of capabilities; empty = full access"},"server_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"expires_in_days":{"type":"integer"}}}}}},"responses":{"201":{"description":"Created"}}}},"/api/api-keys/{id}":{"delete":{"summary":"Revoke an API key","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK"}}}},"/api/mcp":{"post":{"summary":"MCP endpoint (JSON-RPC 2.0, Streamable HTTP) — initialize / tools/list / tools/call","responses":{"200":{"description":"JSON-RPC response"},"401":{"description":"Requires an API key"}}}}}}