:project_id is the Top.gg project ID of a project your OAuth authorization covers, and each endpoint states its required scope.
A project that is not part of the authorization returns 404. A missing scope returns 403.
Project tokens
With a legacy project token, use@me in place of :project_id. The token itself identifies the project. Project tokens only work with @me, and OAuth access tokens only work with explicit project IDs. Request bodies and responses are identical.
Bot endpoints are subject to stricter rate limits than other v1 endpoints. Stay within the published limits to avoid
429 Too Many Requests responses.GET /projects
OAuth scope: none, any valid access token or application token Lists the projects the current credential covers. With an access token that is the single project of the authorization. With an application token it is every project granted to your application, 100 per page. Not available with project tokens.Query parameters
Cursor from a previous response to fetch the next page. Only meaningful with an application token.
Response fields
Present while more pages exist. Pass it back as the
cursor query parameter. Keep paging until the cursor is absent. A page can be empty while later pages still hold projects.Example response
GET /projects/:project_id
OAuth scope:project.information.read
Returns the project associated with your current token.
Response fields
Example response
PATCH /projects/:project_id
OAuth scope:project.information.write
Updates the headline, page content, and/or platform data for your project. headline and page_content are locale-keyed, so you can set content for multiple languages in a single request.
additional_data, under the key for your project’s platform. For example, to set a Minecraft server’s address:
Request body
At least one ofheadline, page_content, or additional_data must be provided.
A map of locale codes to headline strings. Each headline must be between 3 and 140 characters.
A map of locale codes to page content strings (Markdown supported). Each entry must be between 300 and 50,000 characters.
Data that only applies to your project’s platform, with one object per platform. Only the object for your project’s platform is accepted. Sending another returns
422. Omitted fields keep their current value. Only works with an OAuth access token. PATCH /projects/@me returns 422 when it is set.Supported locales
en, de, fr, pt, tr, hi, ja, ar, nl, ko, it, es, ru, uk, vi, zh
Response
Returns204 No Content on success. No response body is returned.
Changes may take up to 1 hour to appear on the website due to caching.
Error responses
POST /projects/:project_id/announcements
OAuth scope:project.announcements.write
Creates a new announcement for your project. Announcements appear on your project’s page and can be used to notify users about updates, new features, or other news.
You can create at most one announcement every 4 hours. Attempts during the cooldown period receive a
429 Too Many Requests response with a Retry-After header indicating how many seconds to wait.Request body
The category to publish the announcement under. One of
announcement, event, or new_feature. Defaults to announcement when omitted.Response fields
Example response
Error responses
PATCH /projects/:project_id/metrics
OAuth scope:project.metrics.write
Submits a single metrics payload for your project. Use this to push fresh numbers after an event such as joining or leaving a guild or a player connecting.
Request body
The body must match the authenticated project’s platform. See the platform payloads section below for the supported fields per platform.Response
Returns204 No Content on success. No response body is returned.
Error responses
POST /projects/:project_id/metrics/batch
OAuth scope:project.metrics.write
Submits up to 100 metrics entries in a single request. Entries without a timestamp are applied first in the order they appear in the request. Entries with a timestamp are applied afterward in ascending timestamp order, so you can backfill gaps or push buffered samples after a network interruption.
Request body
Response
Returns204 No Content when every entry is accepted. If any entry fails validation, processing stops and the request returns 422.
Error responses
Platform payloads
The metrics payload is shaped per platform. ForPATCH /projects/:project_id/metrics, send this payload as the request body. For the batch metrics endpoint, send the same payload under data[].metrics. Sending the wrong shape for your project returns 422.
Discord bot
Use for projects withplatform: "discord" and type: "bot". At least one field is required.
Discord server
Use for projects withplatform: "discord" and type: "server". At least one field is required.
Number of members currently online. Must be zero or greater and cannot exceed
member_count when both are provided.Roblox game
Use for projects withplatform: "roblox" and type: "game".
PUT /projects/:project_id/commands
OAuth scope:project.information.write
Overwrites the list of slash command definitions for your bot project on Top.gg. This endpoint is only applicable to bot-type projects on the discord platform.
Request body
The request body must be a JSON array of command objects following Discord’s application command structure. Pass an empty array to clear all commands.Array of application command objects following Discord’s application command structure.
Response
Returns204 No Content on success. No response body is returned.