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

# Lists a game's tournaments.

> Lists the tournaments of the game you name in gameId, one page at a
time, filtered and sorted by the query parameters you send.

The gameId, title and region filter query parameters are each named after the tournament field they match.
The title and region filters each accept an array of values, sent comma-joined (region=NA,EU) or as a repeated key (region=NA&region=EU).
Each value is split on commas and trimmed, so a title containing a comma cannot be matched exactly, and an empty value is refused with a 400.
The number of title values times the number of region values may not exceed 30, and a search over that is refused with a 400.
If a tournament has the same corresponding field value as any of the array values, it will be included in the response.
For example, the query parameter region with values NA and EU will return
all tournaments with region equal to either 'NA' or 'EU'.
Any query parameter this page does not list is refused with a 400.

sort names the field to sort by, and order sorts it ascending or
descending.

Page through results with the cursor and perPage query parameters.
To fetch the next page, pass the `cursor` a response returns, unchanged.
Keep paging until a response has no `cursor`.




## OpenAPI

````yaml /openapi.json get /tournaments/search
openapi: 3.0.1
info:
  title: BluMint game partner API
  version: 2.0.0
  description: >-
    Reference for the endpoints your game uses to run BluMint tournaments. For
    the walkthrough, see the [game integration guide](https://docs.blumint.com).
    To request an API key, fill in the [game partner setup
    form](https://staging.blumint.io/contact/game-partner), and for a question,
    [contact BluMint](https://staging.blumint.io/contact).
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - description: Staging, for building and testing
    url: https://staging.blumint.io/api
  - description: Production
    url: https://app.blumint.com/api
security:
  - ApiKeyAuth: []
tags: []
paths:
  /tournaments/search:
    get:
      tags:
        - Tournaments
      summary: Lists a game's tournaments.
      description: >
        Lists the tournaments of the game you name in gameId, one page at a

        time, filtered and sorted by the query parameters you send.


        The gameId, title and region filter query parameters are each named
        after the tournament field they match.

        The title and region filters each accept an array of values, sent
        comma-joined (region=NA,EU) or as a repeated key (region=NA&region=EU).

        Each value is split on commas and trimmed, so a title containing a comma
        cannot be matched exactly, and an empty value is refused with a 400.

        The number of title values times the number of region values may not
        exceed 30, and a search over that is refused with a 400.

        If a tournament has the same corresponding field value as any of the
        array values, it will be included in the response.

        For example, the query parameter region with values NA and EU will
        return

        all tournaments with region equal to either 'NA' or 'EU'.

        Any query parameter this page does not list is refused with a 400.


        sort names the field to sort by, and order sorts it ascending or

        descending.


        Page through results with the cursor and perPage query parameters.

        To fetch the next page, pass the `cursor` a response returns, unchanged.

        Keep paging until a response has no `cursor`.
      operationId: tournaments-search
      parameters:
        - name: sort
          in: query
          description: The field to sort by.
          schema:
            type: string
            enum:
              - date
              - endDate
              - checkInTime
              - readyTime
            default: date
        - name: order
          in: query
          description: The order of sorting (ascending or descending).
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: cursor
          in: query
          description: >-
            The cursor the previous page's response returned, passed unchanged.
            Leave it out for the first page.
          schema:
            type: string
          example: 6a6d45ea-d41e-41df-97e2-320783a90f7b
        - name: perPage
          in: query
          description: >-
            How many tournaments one page holds, at most 100. A larger value is
            refused with a 400.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
          example: 10
        - name: gameId
          in: query
          description: >-
            The game whose tournaments to list. An empty value is refused with a
            400.
          required: true
          schema:
            type: string
          example: raini-the-lords-of-light
        - name: title
          in: query
          description: >-
            Tournament titles to match, comma-joined or as a repeated key. Each
            value is split on commas and trimmed, an empty value is refused with
            a 400, and the title values times the region values may not exceed
            30.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example:
            - Deck Boss Version 3
        - name: region
          in: query
          description: >-
            Tournament regions to match, comma-joined or as a repeated key. Each
            value is split on commas and trimmed, an empty value is refused with
            a 400, and the title values times the region values may not exceed
            30.
          schema:
            type: array
            items:
              type: string
          style: form
          explode: false
          example:
            - Global
      responses:
        '200':
          description: One page of tournaments for the requested game.
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                properties:
                  items:
                    type: array
                    description: >-
                      The matching tournaments, at most `perPage` of them. Each
                      item is a full tournament record and can carry fields
                      beyond the documented schema, which you must not rely on.
                      Date fields are UTC ISO 8601 strings with a `Z` suffix and
                      millisecond precision, for example
                      `2023-05-04T16:00:00.000Z`.
                    items:
                      $ref: '#/components/schemas/Tournament'
                  cursor:
                    type: string
                    description: >-
                      Pass the returned `cursor` unchanged to fetch the next
                      page. Keep paging until a response has no `cursor`. A page
                      holding fewer than `perPage` items is the last page and
                      has no `cursor`.
                    example: 6a6d45ea-d41e-41df-97e2-320783a90f7b
        '400':
          description: >-
            A query parameter failed validation. The message names the failed
            check, not the parameter.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
              examples:
                missing-game-id:
                  value:
                    message: 'Invalid input: missing required property'
                unknown-parameter:
                  value:
                    message: 'Invalid input: unknown property'
                empty-filter-value:
                  value:
                    message: 'Invalid input: expected non-empty values'
                too-many-filter-values:
                  value:
                    message: 'Invalid input: too many filter values'
                bad-sort:
                  value:
                    message: 'Invalid input: expected enum value'
                bad-per-page:
                  value:
                    message: 'Invalid input: expected positive integer'
                per-page-too-large:
                  value:
                    message: 'Invalid input: page size exceeds maximum'
                malformed-cursor:
                  value:
                    message: 'Invalid input: expected document id'
                unknown-cursor:
                  value:
                    message: 'Invalid input: cursor names no document in this ordering'
        '401':
          description: The API key is missing or invalid.
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
                    example: Unauthorized - Invalid API key
        '405':
          description: The request used a method other than GET.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Method Not Allowed - Should be GET.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Internal Server Error
        '501':
          description: This filter and sort combination is not supported yet.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      The query requires an index. The request has been logged
                      for the BluMint team to create the index. This may take as
                      little as a 10mins or as long as 6hrs.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    Tournament:
      type: object
      required:
        - gameId
      properties:
        id:
          type: string
          example: 6a6d45ea-d41e-41df-97e2-320783a90f7b
        title:
          type: string
          example: Deck Boss Version 3
        gameTitle:
          type: string
          example: Raini:The Lords of Light
        gameId:
          description: kebab-case title of the tournament's parent game
          type: string
          example: raini-the-lords-of-light
        endpoint:
          type: string
          nullable: true
          example: null
        date:
          type: string
          format: date-time
          example: '2023-05-04T17:00:00.000Z'
        endDate:
          type: string
          format: date-time
          example: '2023-05-04T19:30:00.000Z'
        imgUrl:
          type: string
          nullable: true
          example: >-
            https://firebasestorage.googleapis.com/v0/b/blumint-development.appspot.com/o/Game%2Fraini-the-lords-of-light%2FRTLOLTourneyThumbnail-128x128.png?alt=media&token=a5b33dcd-7cef-4db1-a36a-5878a2921ddf
        blurb:
          $ref: '#/components/schemas/Blurb'
        sponsors:
          type: array
          items:
            $ref: '#/components/schemas/Sponsor'
          nullable: true
        region:
          type: string
          nullable: true
          example: Global
        tournamentDetails:
          type: array
          items:
            $ref: '#/components/schemas/TournamentDetail'
        checkInTime:
          type: string
          format: date-time
          example: '2023-05-04T16:00:00.000Z'
        readyTime:
          type: string
          format: date-time
          example: '2023-05-04T16:55:00.000Z'
        scoreOption:
          type: array
          items:
            $ref: '#/components/schemas/ScoreOption'
    Blurb:
      type: object
      properties:
        title:
          type: string
          example: Raini:The Lords of Light Tournament
        description:
          type: string
          example: >-
            Join us for an exciting single-elimination tournament with a $50
            prize pool!
        rules:
          type: array
          items:
            type: string
          nullable: true
          example:
            - No cheating
            - Participants must check-in before the event
    Sponsor:
      type: object
      properties:
        name:
          type: string
          example: SupraOracles
        imgUrl:
          type: string
          nullable: true
          example: >-
            https://firebasestorage.googleapis.com/v0/b/blumint-development.appspot.com/o/Game%2Fbig-time%2FSupraOraclesLogo.png?alt=media&token=2403e048-af79-45e8-8da0-341ae5a5d21c
        redirectUrl:
          type: string
          nullable: true
          example: https://supraoracles.com/
        width:
          type: integer
          nullable: true
          example: 200
        height:
          type: integer
          nullable: true
          example: 200
    TournamentDetail:
      type: object
      properties:
        title:
          type: string
          example: Registration And Check In
        body:
          type: string
          example: >-
            All players must register to participate in this tournament. You may
            register via the panel below. You will be prompted to provide your
            Discord ID and email address.
    ScoreOption:
      type: object
      properties:
        name:
          type: string
          example: Score
        units:
          type: string
          example: Points
        value:
          type: number
          nullable: true
          example: 100
        orderBy:
          type: string
          enum:
            - asc
            - desc
          example: desc
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.