{"openapi":"3.1.0","info":{"title":"404bot Workspace API","version":"16.3.0","description":"Scoped API keys. No cookie authentication. Current account and resource permissions are checked on every request."},"servers":[{"url":"https://404bot.de"}],"paths":{"/api/v1/status":{"get":{"summary":"Service status","description":"Release and key workspace. Scope: read.","operationId":"get_api_v1_status","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/workspace":{"get":{"summary":"Workspace summary","description":"Workspace identity and creator identity. Scope: read.","operationId":"get_api_v1_workspace","security":[{"bearerAuth":[]}],"parameters":[],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/bots":{"get":{"summary":"List bots","description":"Permission-filtered bot metadata. No tokens or configuration secrets. Scope: read.","operationId":"get_api_v1_bots","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/bots/{id}":{"get":{"summary":"Inspect a bot","description":"Worker status and connected guilds. Scope: read.","operationId":"get_api_v1_bots__id_","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/bots/{id}/modules":{"get":{"summary":"List bot modules","description":"Module keys and enabled flags only. Scope: read.","operationId":"get_api_v1_bots__id__modules","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/bots/{id}/logs":{"get":{"summary":"Read worker logs","description":"Recent lines with credential redaction. Scope: read.","operationId":"get_api_v1_bots__id__logs","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/bots/{id}/actions":{"post":{"summary":"Run a bot action","description":"Supported console actions, checked against the creator permissions. Scope: control for writes.","operationId":"post_api_v1_bots__id__actions","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Keep the same UUID and body for retries. Results retained for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["command"],"additionalProperties":false,"properties":{"command":{"type":"string","enum":["help","status","ping","modules","commands","start","stop","restart","sync","deploy","announce","slowmode"]},"args":{"type":"object","additionalProperties":{"type":"string"}},"confirmed":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/bots/{id}/modules/{module}":{"patch":{"summary":"Toggle a module","description":"Change enabled state without overwriting existing module configuration. Scope: control.","operationId":"patch_api_v1_bots__id__modules__module_","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"module","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Keep the same UUID and body for retries. Results retained for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"additionalProperties":false,"properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/servers":{"get":{"summary":"List game servers","description":"Permission-filtered metadata; add live=1 for external connection probes. Scope: read.","operationId":"get_api_v1_servers","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}},{"name":"live","in":"query","schema":{"type":"integer","enum":[0,1],"default":0}}],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/servers/{id}/restart":{"post":{"summary":"Restart game server","description":"Requires servers.control, confirmed=true and an idempotency UUID. Scope: control.","operationId":"post_api_v1_servers__id__restart","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Keep the same UUID and body for retries. Results retained for 24 hours."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["confirmed"],"additionalProperties":false,"properties":{"confirmed":{"const":true}}}}}},"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/events":{"get":{"summary":"List events","description":"Permission-filtered event metadata and registration counts. Scope: read.","operationId":"get_api_v1_events","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/events/{id}/registrations":{"get":{"summary":"Event registrations","description":"Includes participant data; only users with event-review rights can read it. Scope: read + events.review.","operationId":"get_api_v1_events__id__registrations","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}},"/api/v1/activity":{"get":{"summary":"Workspace activity","description":"Recent action summaries, without raw audit details. Scope: read + activity.view.","operationId":"get_api_v1_activity","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"Successful JSON response. Collection responses include limit, offset and total.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimit"},"502":{"$ref":"#/components/responses/UpstreamError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key"}},"responses":{"BadRequest":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"Unauthorized":{"description":"Missing, invalid, expired or revoked key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"Forbidden":{"description":"Scope or current permissions do not allow the action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"NotFound":{"description":"Resource not found in this workspace","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"Conflict":{"description":"Confirmation missing, request ID reused, action busy or result unknown","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"RateLimit":{"description":"Too many requests","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}},"UpstreamError":{"description":"External service failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}}}}}}}