> ## Documentation Index
> Fetch the complete documentation index at: https://docs.discordbotlist.lol/llms.txt
> Use this file to discover all available pages before exploring further.

# Post the server count

> Report how many servers the bot is in. Rate limit: 60 requests per minute per token, which is well above one post per shard per interval.

Re-posting the same number is cheap: the page cache is only invalidated when the value actually changes. The check-in timestamp is written every time, and it is what the bot page reads as a liveness signal.



## OpenAPI

````yaml /openapi.json post /api/v1/bots/{id}/stats
openapi: 3.1.0
info:
  title: Discord Bot List API
  version: 1.0.0
  description: >-
    Everything under /api/v1 acts on one listing: the token identifies the bot,
    and the id in the path has to be that same bot. A mismatch answers 404
    rather than 403, so a token cannot be used to discover which other bots
    exist.
  contact:
    name: Support
    url: https://discordbotlist.lol/contact
  license:
    name: Terms of Service
    url: https://discordbotlist.lol/terms
servers:
  - url: https://discordbotlist.lol
    description: Production
security:
  - botToken: []
paths:
  /api/v1/bots/{id}/stats:
    post:
      tags:
        - Bot
      summary: Post the server count
      description: >-
        Report how many servers the bot is in. Rate limit: 60 requests per
        minute per token, which is well above one post per shard per interval.


        Re-posting the same number is cheap: the page cache is only invalidated
        when the value actually changes. The check-in timestamp is written every
        time, and it is what the bot page reads as a liveness signal.
      operationId: postServerCount
      parameters:
        - $ref: '#/components/parameters/botId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: >-
                One of the three field names is required. They are aliases;
                server_count is the canonical one and the other two exist
                because SDKs in the wild send them.
              properties:
                server_count:
                  type: integer
                  minimum: 0
                  maximum: 100000000
                serverCount:
                  type: integer
                  minimum: 0
                  maximum: 100000000
                guildCount:
                  type: integer
                  minimum: 0
                  maximum: 100000000
            example:
              server_count: 1482
      responses:
        '200':
          description: Stored.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  server_count:
                    type: integer
              example:
                success: true
                server_count: 1482
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    botId:
      name: id
      in: path
      required: true
      description: >-
        The bot's Discord application id. It has to be the bot the token belongs
        to.
      schema:
        type: string
        pattern: ^\d{17,19}$
      example: '1092194789458481202'
  responses:
    BadRequest:
      description: The body or a query parameter is malformed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid JSON body.
    Unauthorized:
      description: Missing, malformed or unknown token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid token.
    NotFound:
      description: No such bot, or the token belongs to a different one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Bot not found.
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Rate limit exceeded.
            retryAfter: 42
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: One sentence, safe to show a developer.
        retryAfter:
          type: integer
          description: Seconds until the limit resets. Only on 429.
      required:
        - error
  securitySchemes:
    botToken:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        The bot's API token, generated on its edit page. Sent bare or as `Bearer
        <token>` -- both are accepted, because the libraries already posting to
        other lists send both. The token is shown once; generating a new one
        invalidates the old.

````