{"openapi":"3.1.0","info":{"title":"Nexobots API","version":"1.0.0"},"servers":[{"url":"https://api.nexobots.app"}],"components":{"securitySchemes":{"token":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"Stats":{"type":"object","properties":{"server_count":{"type":"integer","minimum":0,"maximum":100000000},"shard_count":{"type":"integer","minimum":0,"maximum":1000000}},"required":["server_count"],"additionalProperties":false},"SearchQuery":{"type":"object","properties":{"page":{"type":"integer","minimum":1,"default":1},"pageSize":{"type":"integer","minimum":1,"maximum":100,"default":24},"q":{"type":"string","maxLength":100},"tag":{"type":"string","maxLength":40},"sort":{"type":"string","enum":["votes","servers","new","bumped","relevance"],"default":"votes"},"slash":{"type":"string","enum":["true","false"]},"nsfw":{"type":"string","enum":["true","false"]},"language":{"type":"string","maxLength":30},"command":{"type":"string","maxLength":60},"speaks":{"type":"string","enum":["en","nl","de","fr","es","pt","it","pl","tr","ru","uk","da","no","sv","fi","ar","hi","id","ja","ko","zh"]},"pricing":{"type":"string","enum":["free","freemium","paid"]}},"additionalProperties":false}}},"paths":{"/v1/bots/{id}":{"get":{"summary":"Public bot info","x-rate-limit":"60 / min per IP","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The bot's client ID"}],"responses":{"200":{"description":"The bot"},"404":{"description":"Not listed"}}}},"/v1/bots/{id}/stats":{"post":{"summary":"Post server and shard count","x-rate-limit":"1 / 5 min per bot","security":[{"token":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The bot's client ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"}}}},"responses":{"200":{"description":"Saved"},"401":{"description":"Missing or invalid token"},"429":{"description":"Rate limited"}}}},"/v1/bots/{id}/commands":{"post":{"summary":"Replace the bot's command list. Takes a list, an object with a commands list, or Discord's own format","x-rate-limit":"1 / min per bot","security":[{"token":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The bot's client ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","maxItems":200,"items":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"usage":{"type":"string"}}}}}}},"responses":{"200":{"description":"{ ok, commands: number saved }"},"400":{"description":"Invalid or empty list"},"401":{"description":"Missing or invalid token"},"429":{"description":"Rate limited"}}}},"/v1/bots/{id}/heartbeat":{"post":{"summary":"Say the bot is online. Send one every 5 minutes for uptime to count","x-rate-limit":"1 / min per bot","security":[{"token":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The bot's client ID"}],"responses":{"200":{"description":"Saved"},"401":{"description":"Missing or invalid token"},"429":{"description":"Rate limited"}}}},"/v1/bots/{id}/votes/check":{"get":{"summary":"Has this user voted in the last 12 hours?","x-rate-limit":"120 / min per token","security":[{"token":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The bot's client ID"},{"name":"userId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{ voted: 0 | 1, voted_at }"}}}},"/v1/bots/{id}/votes":{"get":{"summary":"Last 1,000 voters","x-rate-limit":"10 / min per token","security":[{"token":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The bot's client ID"}],"responses":{"200":{"description":"Voters, newest first"}}}},"/v1/bots/search":{"get":{"summary":"Search, for integrations","x-rate-limit":"30 / min per IP","parameters":[{"name":"q","in":"query","schema":{"type":"string"}},{"name":"tag","in":"query","schema":{"type":"string"}},{"name":"sort","in":"query","schema":{"enum":["votes","servers","new"]}}],"responses":{"200":{"description":"Matching bots"}}}},"/v1/users/{id}":{"get":{"summary":"Public profile","x-rate-limit":"60 / min per IP","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The user"}}}},"/v1/widget/{id}.svg":{"get":{"summary":"Embeddable badge (votes, servers)","x-rate-limit":"Cached at the edge","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The bot's client ID"}],"responses":{"200":{"description":"SVG image"}}}}}}