{
  "openapi": "3.0.4",
  "info": {
    "title": "Top.gg Developer API",
    "termsOfService": "https://www.top.gg/tos",
    "contact": {
      "email": "support@top.gg"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://top.gg/api/v1"
    }
  ],
  "paths": {
    "/projects/@me": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get the project associated with the authenticated token.",
        "responses": {
          "200": {
            "description": "The project was found and returned.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid project ID in token or token had the wrong schema.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Token was valid, but the project no longer exists.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          { }
        ]
      },
      "patch": {
        "tags": [
          "Project"
        ],
        "summary": "Update the current project's content per locale.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Content updated successfully."
          },
          "400": {
            "description": "Invalid project ID in token or token had the wrong schema.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The project no longer exists.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          { }
        ]
      }
    },
    "/projects/@me/commands": {
      "put": {
        "tags": [
          "Project"
        ],
        "summary": "Replace the list of registered commands for the current project.",
        "description": "Only valid for Discord bot projects. Commands are stored per locale and at least one English\nentry per command is required.",
        "requestBody": {
          "description": "The commands to register.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MinimalApplicationCreatePacket"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MinimalApplicationCreatePacket"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MinimalApplicationCreatePacket"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Commands were accepted and stored."
          },
          "400": {
            "description": "Invalid project ID in token.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          { }
        ]
      }
    },
    "/projects/@me/votes": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Fetch a page of votes for the current project.",
        "description": "Either cursor or startDate must be provided. Votes are\nreturned in ascending creation order. Use the returned `cursor` to page forward.",
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque cursor from a previous response. Mutually exclusive with\nstartDate.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "The earliest vote creation time to return. Must be within the last year.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of votes was returned.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VoteQueueResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoteQueueResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoteQueueResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid project ID, missing pagination parameters, or invalid cursor.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The project no longer exists.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          { }
        ]
      }
    },
    "/projects/@me/votes/{id}": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get the current vote status of a single user for the current project.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "The user ID. Interpreted according to source.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "query",
            "description": "Which ID namespace to resolve. Defaults to Top.gg internal IDs.",
            "schema": {
              "$ref": "#/components/schemas/UserQuerySource"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The user has an active vote.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/VoteResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoteResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid project ID in token.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The user was not found, has never voted, or the vote has expired.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          { }
        ]
      }
    },
    "/projects/@me/metrics": {
      "patch": {
        "tags": [
          "Project"
        ],
        "summary": "Submit a single metrics payload for the current project.",
        "description": "The request body shape depends on the project's platform:\nDiscordBotMetricsInput, DiscordServerMetricsInput,\nRobloxGameMetricsInput, or MinecraftServerMetricsInput.\nSending a shape that does not match the authenticated project's platform is rejected.",
        "requestBody": {
          "description": "Metrics payload. The fields you send depend on the authenticated project's platform. Discord bots use server_count and shard_count. Discord servers use member_count and online_count. Roblox games use player_count. Minecraft servers use players_online, players_max, uptime_seconds, tick_rate, tick_duration_avg, world_size_x, and world_size_y. Send only the fields relevant to your platform.",
          "content": {
            "application/json": {
              "schema": {
                "title": "PostMetricsInput",
                "type": "object",
                "properties": {
                  "server_count": {
                    "type": "integer",
                    "description": "Total number of servers the bot is currently in.",
                    "format": "int32",
                    "nullable": true
                  },
                  "shard_count": {
                    "type": "integer",
                    "description": "Total number of shards the bot is currently running.",
                    "format": "int32",
                    "nullable": true
                  },
                  "member_count": {
                    "type": "integer",
                    "description": "Total number of members in the server.",
                    "format": "int32",
                    "nullable": true
                  },
                  "online_count": {
                    "type": "integer",
                    "description": "Number of members currently online. Must not exceed MemberCount.",
                    "format": "int32",
                    "nullable": true
                  },
                  "player_count": {
                    "type": "integer",
                    "description": "Current number of players in the game. Required.",
                    "format": "int32",
                    "nullable": true
                  },
                  "players_online": {
                    "type": "integer",
                    "description": "Number of players currently online. Must not exceed PlayersMax.",
                    "format": "int32",
                    "nullable": true
                  },
                  "players_max": {
                    "type": "integer",
                    "description": "Maximum number of players the server allows.",
                    "format": "int32",
                    "nullable": true
                  },
                  "uptime_seconds": {
                    "type": "integer",
                    "description": "Server uptime in seconds since the last restart.",
                    "format": "int64",
                    "nullable": true
                  },
                  "tick_rate": {
                    "type": "number",
                    "description": "Current tick rate of the server. Typically, a value close to 20.0 on a healthy server.",
                    "format": "double",
                    "nullable": true
                  },
                  "tick_duration_avg": {
                    "type": "number",
                    "description": "Average duration of a single server tick, in milliseconds.",
                    "format": "double",
                    "nullable": true
                  },
                  "world_size_x": {
                    "type": "integer",
                    "description": "Total world size along the X axis, in blocks.",
                    "format": "int32",
                    "nullable": true
                  },
                  "world_size_y": {
                    "type": "integer",
                    "description": "Total world size along the Y axis, in blocks.",
                    "format": "int32",
                    "nullable": true
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Metrics were accepted and stored."
          },
          "400": {
            "description": "Invalid project ID in token.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The project no longer exists.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "The payload was malformed, empty, or invalid for the project's platform.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "The upstream metrics service is temporarily unavailable.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          { }
        ]
      }
    },
    "/projects/@me/metrics/batch": {
      "post": {
        "tags": [
          "Project"
        ],
        "summary": "Submit up to 100 metrics entries for the current project in a single request.",
        "description": "Entries are applied in ascending timestamp order. Each entry's `metrics` field follows\nthe same per-platform shape as Task&lt;IActionResult&gt; SelfProjectsController.UpdateMetricsAsync(JsonElement body).",
        "requestBody": {
          "description": "Batch metrics payload, up to 100 entries. The fields you send depend on the authenticated project's platform. Discord bots use server_count and shard_count. Discord servers use member_count and online_count. Roblox games use player_count. Minecraft servers use players_online, players_max, uptime_seconds, tick_rate, tick_duration_avg, world_size_x, and world_size_y. Send only the fields relevant to your platform.",
          "content": {
            "application/json": {
              "schema": {
                "title": "PostMetricsBatchInput",
                "required": [
                  "data"
                ],
                "type": "object",
                "properties": {
                  "data": {
                    "type": "array",
                    "items": {
                      "title": "PostMetricsBatchEntry",
                      "required": [
                        "metrics"
                      ],
                      "type": "object",
                      "properties": {
                        "metrics": {
                          "title": "PostMetricsInput",
                          "type": "object",
                          "properties": {
                            "server_count": {
                              "type": "integer",
                              "description": "Total number of servers the bot is currently in.",
                              "format": "int32",
                              "nullable": true
                            },
                            "shard_count": {
                              "type": "integer",
                              "description": "Total number of shards the bot is currently running.",
                              "format": "int32",
                              "nullable": true
                            },
                            "member_count": {
                              "type": "integer",
                              "description": "Total number of members in the server.",
                              "format": "int32",
                              "nullable": true
                            },
                            "online_count": {
                              "type": "integer",
                              "description": "Number of members currently online. Must not exceed MemberCount.",
                              "format": "int32",
                              "nullable": true
                            },
                            "player_count": {
                              "type": "integer",
                              "description": "Current number of players in the game. Required.",
                              "format": "int32",
                              "nullable": true
                            },
                            "players_online": {
                              "type": "integer",
                              "description": "Number of players currently online. Must not exceed PlayersMax.",
                              "format": "int32",
                              "nullable": true
                            },
                            "players_max": {
                              "type": "integer",
                              "description": "Maximum number of players the server allows.",
                              "format": "int32",
                              "nullable": true
                            },
                            "uptime_seconds": {
                              "type": "integer",
                              "description": "Server uptime in seconds since the last restart.",
                              "format": "int64",
                              "nullable": true
                            },
                            "tick_rate": {
                              "type": "number",
                              "description": "Current tick rate of the server. Typically, a value close to 20.0 on a healthy server.",
                              "format": "double",
                              "nullable": true
                            },
                            "tick_duration_avg": {
                              "type": "number",
                              "description": "Average duration of a single server tick, in milliseconds.",
                              "format": "double",
                              "nullable": true
                            },
                            "world_size_x": {
                              "type": "integer",
                              "description": "Total world size along the X axis, in blocks.",
                              "format": "int32",
                              "nullable": true
                            },
                            "world_size_y": {
                              "type": "integer",
                              "description": "Total world size along the Y axis, in blocks.",
                              "format": "int32",
                              "nullable": true
                            }
                          },
                          "additionalProperties": false
                        },
                        "timestamp": {
                          "type": "string",
                          "description": "When the metrics were collected. If omitted, the server treats the entry as unordered against other undated entries. Must not be more than 5 minutes in the future.",
                          "format": "date-time",
                          "nullable": true
                        }
                      },
                      "additionalProperties": false
                    },
                    "description": "The batch of metrics entries to submit. Entries are applied in ascending timestamp order."
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "All entries were accepted."
          },
          "400": {
            "description": "Invalid project ID in token.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The project no longer exists.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "The batch was empty, too large, or contained an invalid entry.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "The upstream metrics service is temporarily unavailable.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          { }
        ]
      }
    },
    "/projects/@me/announcements": {
      "post": {
        "tags": [
          "Project"
        ],
        "summary": "Create an announcement for the current project.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAnnouncementInput"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAnnouncementInput"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAnnouncementInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Announcement created successfully.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AnnouncementResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnnouncementResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AnnouncementResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid project ID in token or token had the wrong schema.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The project no longer exists.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Validation failed.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited - only one announcement every 4 hours.",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          { }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AnnouncementCategory": {
        "type": "integer",
        "description": "The category to publish the announcement under."
      },
      "AnnouncementResponse": {
        "required": [
          "title",
          "content",
          "category"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "The title of the announcement."
          },
          "content": {
            "type": "string",
            "description": "The body content of the announcement."
          },
          "category": {
            "$ref": "#/components/schemas/AnnouncementCategory"
          },
          "createdAt": {
            "type": "string",
            "description": "When the announcement was created.",
            "format": "date-time"
          }
        },
        "description": "A project announcement."
      },
      "ApplicationCommandOption": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ApplicationCommandOptionType"
          },
          "name": {
            "type": "string"
          },
          "name_localizations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "description": {
            "type": "string"
          },
          "description_localizations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "required": {
            "type": "boolean",
            "nullable": true
          },
          "choices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCommandOptionChoice"
            },
            "nullable": true
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCommandOption"
            },
            "nullable": true
          },
          "channel_types": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelType"
            },
            "nullable": true
          },
          "min_length": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "format": "int32",
            "nullable": true
          },
          "max_length": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "format": "int32",
            "nullable": true
          },
          "min_value": { },
          "max_value": { },
          "autocomplete": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "ApplicationCommandOptionChoice": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "name_localizations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "value": { }
        }
      },
      "ApplicationCommandOptionType": {
        "type": "integer"
      },
      "ApplicationCommandType": {
        "type": "integer"
      },
      "ChannelType": {
        "type": "integer"
      },
      "CreateAnnouncementInput": {
        "required": [
          "title",
          "content"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "The title of the announcement."
          },
          "content": {
            "type": "string",
            "description": "The body content of the announcement."
          },
          "category": {
            "type": "integer",
            "oneOf": [
              {
                "$ref": "#/components/schemas/AnnouncementCategory"
              }
            ],
            "nullable": true
          }
        },
        "description": "Input for creating a project announcement."
      },
      "DiscordBotMetricsInput": {
        "title": "DiscordBotMetricsInput",
        "type": "object",
        "properties": {
          "server_count": {
            "type": "integer",
            "description": "Total number of servers the bot is currently in.",
            "format": "int32",
            "nullable": true
          },
          "shard_count": {
            "type": "integer",
            "description": "Total number of shards the bot is currently running.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DiscordServerMetricsInput": {
        "title": "DiscordServerMetricsInput",
        "type": "object",
        "properties": {
          "member_count": {
            "type": "integer",
            "description": "Total number of members in the server.",
            "format": "int32",
            "nullable": true
          },
          "online_count": {
            "type": "integer",
            "description": "Number of members currently online. Must not exceed MemberCount.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "JsonElement": { },
      "MinecraftServerMetricsInput": {
        "title": "MinecraftServerMetricsInput",
        "type": "object",
        "properties": {
          "players_online": {
            "type": "integer",
            "description": "Number of players currently online. Must not exceed PlayersMax.",
            "format": "int32",
            "nullable": true
          },
          "players_max": {
            "type": "integer",
            "description": "Maximum number of players the server allows.",
            "format": "int32",
            "nullable": true
          },
          "uptime_seconds": {
            "type": "integer",
            "description": "Server uptime in seconds since the last restart.",
            "format": "int64",
            "nullable": true
          },
          "tick_rate": {
            "type": "number",
            "description": "Current tick rate of the server. Typically, a value close to 20.0 on a healthy server.",
            "format": "double",
            "nullable": true
          },
          "tick_duration_avg": {
            "type": "number",
            "description": "Average duration of a single server tick, in milliseconds.",
            "format": "double",
            "nullable": true
          },
          "world_size_x": {
            "type": "integer",
            "description": "Total world size along the X axis, in blocks.",
            "format": "int32",
            "nullable": true
          },
          "world_size_y": {
            "type": "integer",
            "description": "Total world size along the Y axis, in blocks.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MinimalApplicationCreatePacket": {
        "type": "object",
        "properties": {
          "type": {
            "type": "integer",
            "oneOf": [
              {
                "$ref": "#/components/schemas/ApplicationCommandType"
              }
            ],
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "name_localizations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "description_localizations": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "options": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplicationCommandOption"
            },
            "nullable": true
          },
          "nsfw": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "Platform": {
        "type": "integer"
      },
      "PostMetricsBatchEntry": {
        "type": "object",
        "properties": {
          "metrics": {
            "$ref": "#/components/schemas/JsonElement"
          },
          "timestamp": {
            "type": "string",
            "description": "When the metrics were collected. Entries without a timestamp are applied before any dated\nentries, in the order they appear in the request. Must not be more than 5 minutes in the\nfuture.",
            "format": "date-time",
            "nullable": true
          }
        },
        "description": "A single entry in a metrics batch submission."
      },
      "PostMetricsBatchInput": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostMetricsBatchEntry"
            },
            "description": "The batch of metrics entries to submit. Entries are applied in ascending timestamp order."
          }
        },
        "description": "Batch metrics submission payload. Up to 100 entries per request."
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "ProjectResponse": {
        "type": "object",
        "properties": {
          "id": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "description": "The internal Top.gg ID of the project.",
            "format": "int64"
          },
          "name": {
            "type": "string",
            "description": "The display name of the project, usually this is managed by the external platform."
          },
          "type": {
            "$ref": "#/components/schemas/Type"
          },
          "platform": {
            "$ref": "#/components/schemas/Platform"
          },
          "headline": {
            "type": "string",
            "description": "The creator-defined headline for the project."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "A list of unique tag slugs associated with this project."
          },
          "votes": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "description": "Number of votes the project currently has for ranking purposes.",
            "format": "int32"
          },
          "votesTotal": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "description": "Number of total votes the project has received.",
            "format": "int32"
          },
          "reviewScore": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "description": "Average review score for the project from 1 to 5.",
            "format": "double",
            "nullable": true
          },
          "reviewCount": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "description": "Total number of reviews for the project.",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "RobloxGameMetricsInput": {
        "title": "RobloxGameMetricsInput",
        "type": "object",
        "properties": {
          "player_count": {
            "type": "integer",
            "description": "Current number of players in the game. Required.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "Type": {
        "type": "integer"
      },
      "UpdateProjectInput": {
        "type": "object",
        "properties": {
          "headline": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Headline text per locale (e.g. {\"en\": \"My Bot\", \"de\": \"Mein Bot\"}).",
            "nullable": true
          },
          "pageContent": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Page content per locale (e.g. {\"en\": \"Full description...\"}).",
            "nullable": true
          }
        },
        "description": "Input for updating project content per locale."
      },
      "UserQuerySource": {
        "type": "integer"
      },
      "VoteQueueItemResponse": {
        "type": "object",
        "properties": {
          "userId": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "description": "The internal Top.gg user ID of the voter.",
            "format": "int64"
          },
          "platformId": {
            "type": "string",
            "description": "The platform-specific ID of the voter on the project's platform (for example a Discord user\nID)."
          },
          "weight": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "description": "The weight of the vote. Weekend votes are worth 2, regular votes are worth 1.",
            "format": "int32"
          },
          "createdAt": {
            "type": "string",
            "description": "When the vote was cast.",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "description": "When the vote expires.",
            "format": "date-time"
          }
        },
        "description": "A single vote entry in a vote queue response."
      },
      "VoteQueueResponse": {
        "type": "object",
        "properties": {
          "cursor": {
            "type": "string",
            "description": "Opaque cursor used to fetch the next page of votes. Pass this value back in the `cursor`\nquery parameter on the next request."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VoteQueueItemResponse"
            },
            "description": "The votes contained in this page, ordered by creation time ascending."
          }
        },
        "description": "A paginated batch of votes for a project."
      },
      "VoteResponse": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "description": "When the vote was cast.",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "description": "When the vote expires. Votes are valid for 12 hours after being cast.",
            "format": "date-time"
          },
          "weight": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "description": "The weight of the vote. Weekend votes are worth 2, regular votes are worth 1.",
            "format": "int32"
          }
        },
        "description": "The current vote status of a single user for a project."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Json Web Token"
      }
    }
  },
  "tags": [
    {
      "name": "Project"
    }
  ]
}