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

# List the caller's own decks

> Returns the authenticated user's decks for a game across all visibilities (Public, Private, Unlisted), excluding archived. Requires PAT auth — partner-only callers receive 401 because there is no user to scope to.

The ``featured_cards``, ``section_counts`` and ``colors`` fields are only present when ``include=summary`` is passed — same opt-in and same shape as ``/decks``, and the enrichment runs for the caller's private decks too. ``expanded_cards`` is never returned on the list — fetch the detail endpoint with ``expand=cards`` for the full inventory.



## OpenAPI

````yaml /openapi.json get /api/public/v1/games/{game}/decks/my
openapi: 3.0.3
info:
  title: Flexslot API
  version: 1.0.0
  description: API documentation for Flexslot decks application
servers:
  - url: https://api.flexslot.gg
    description: Production
  - url: https://api-dev.flexslot.gg
    description: Development
security: []
paths:
  /api/public/v1/games/{game}/decks/my:
    get:
      tags:
        - Decks
      summary: List the caller's own decks
      description: >-
        Returns the authenticated user's decks for a game across all
        visibilities (Public, Private, Unlisted), excluding archived. Requires
        PAT auth — partner-only callers receive 401 because there is no user to
        scope to.


        The ``featured_cards``, ``section_counts`` and ``colors`` fields are
        only present when ``include=summary`` is passed — same opt-in and same
        shape as ``/decks``, and the enrichment runs for the caller's private
        decks too. ``expanded_cards`` is never returned on the list — fetch the
        detail endpoint with ``expand=cards`` for the full inventory.
      operationId: games_decks_my_retrieve
      parameters:
        - in: query
          name: authorId
          schema:
            type: string
          description: Filter by deck author (firebase user id).
        - in: query
          name: createdAfter
          schema:
            type: string
            format: date-time
          description: ISO 8601 lower bound on creation timestamp (inclusive).
        - in: query
          name: createdBefore
          schema:
            type: string
            format: date-time
          description: ISO 8601 upper bound on creation timestamp (inclusive).
        - in: query
          name: editedAfter
          schema:
            type: string
            format: date-time
          description: ISO 8601 lower bound on last-edit timestamp (inclusive).
        - in: query
          name: editedBefore
          schema:
            type: string
            format: date-time
          description: ISO 8601 upper bound on last-edit timestamp (inclusive).
        - in: query
          name: formatId
          schema:
            type: string
            format: uuid
          description: Filter by format id.
        - in: path
          name: game
          schema:
            type: string
          required: true
        - in: query
          name: hasGuide
          schema:
            type: boolean
          description: Filter to decks that do/don't have in-deck strategy notes.
        - in: query
          name: hasSideboardGuide
          schema:
            type: boolean
          description: Filter to decks that do/don't have an attached sideboard guide.
        - in: query
          name: hasVideo
          schema:
            type: boolean
          description: Filter to decks that do/don't link a YouTube video.
        - in: query
          name: include
          schema:
            type: string
            enum:
              - summary
          description: >-
            Set to ``summary`` to add ``featured_cards``, ``section_counts`` and
            ``colors`` to each list item — enough to render a rich deck card
            without a per-deck detail fetch. Omitted by default to keep the list
            lean.
        - in: query
          name: isLegal
          schema:
            type: boolean
          description: Filter by format-legality flag.
        - in: query
          name: limit
          schema:
            type: integer
          description: Page size (max 100, default 20).
        - in: query
          name: order
          schema:
            type: string
            enum:
              - asc
              - desc
          description: Sort direction. Defaults to ``desc``.
        - in: query
          name: page
          schema:
            type: integer
          description: 1-indexed page number.
        - in: query
          name: q
          schema:
            type: string
          description: Substring filter on deck name (case-insensitive).
        - in: query
          name: sort
          schema:
            type: string
            enum:
              - createdAt
              - editedAt
              - likes
              - trending
              - views
          description: Sort key. Defaults to ``editedAt``.
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicDeckSummaryItem'
          description: ''
      security:
        - PartnerHmac: []
          PartnerSlug: []
          PersonalAccessToken: []
        - PartnerHmac: []
          PartnerSlug: []
        - ApiKey: []
        - PersonalAccessToken: []
        - OAuth2DPoP: []
          OAuth2DPoPProof: []
        - OAuth2Bearer: []
components:
  schemas:
    PublicDeckSummaryItem:
      type: object
      description: >-
        Provides ``featured_cards`` for any deck serializer.


        Relies on ``special_cards__card`` (and legacy
        commander/partner/companion

        FKs) being prefetched/selected by the caller's selector. The

        ``GameSpecialCardType`` lookup is cached on serializer context so a
        whole

        page of decks costs one query, not one per deck.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          readOnly: true
        author:
          type: object
          nullable: true
          readOnly: true
        game:
          type: string
          readOnly: true
        visibility:
          type: array
          items:
            type: string
          readOnly: true
        format:
          type: object
          nullable: true
          readOnly: true
        archetype:
          type: string
          nullable: true
          readOnly: true
        views:
          type: integer
          readOnly: true
        likes:
          type: integer
          readOnly: true
        hasGuide:
          type: boolean
          readOnly: true
        hasSideboardGuide:
          type: boolean
          readOnly: true
        hasVideo:
          type: boolean
          readOnly: true
        editedAt:
          type: string
          format: date-time
          readOnly: true
        createdAt:
          type: string
          format: date-time
          readOnly: true
        sourceProvider:
          type: string
          nullable: true
          readOnly: true
        featured_cards:
          type: array
          items:
            $ref: '#/components/schemas/FeaturedCard'
          readOnly: true
        section_counts:
          type: object
          additionalProperties:
            type: integer
          readOnly: true
        colors:
          type: array
          items:
            type: string
          readOnly: true
      required:
        - archetype
        - author
        - createdAt
        - editedAt
        - format
        - game
        - hasGuide
        - hasSideboardGuide
        - hasVideo
        - id
        - likes
        - name
        - sourceProvider
        - views
        - visibility
    FeaturedCard:
      type: object
      description: |-
        Structured featured/special card entry — game-agnostic.

        Covers MTG commander/partner/companion and Riftbound legend/champion/
        battlefield uniformly. ``slot`` is the base type (group key);
        ``slotKey`` preserves the ordinal so ``battlefield_1`` and
        ``battlefield_2`` stay distinguishable.
      properties:
        slot:
          type: string
          description: Base special-card type, e.g. 'legend', 'battlefield'.
        slotKey:
          type: string
          description: Raw type incl. ordinal, e.g. 'battlefield_1'.
        label:
          type: string
          description: Human-readable label, e.g. 'Battlefield'.
        sortOrder:
          type: integer
          description: Order within the slot.
        foil:
          type: boolean
        cardId:
          type: string
        name:
          type: string
        imageUrl:
          type: string
          nullable: true
          description: >-
            Absolute CDN URL to the card's full-art image. null when the card
            has no stored image.
        type_line:
          type: string
          nullable: true
        set:
          type: string
          nullable: true
        collector_number:
          type: string
          nullable: true
      required:
        - cardId
        - collector_number
        - foil
        - imageUrl
        - label
        - name
        - set
        - slot
        - slotKey
        - sortOrder
        - type_line
  securitySchemes:
    PartnerHmac:
      type: apiKey
      in: header
      name: X-Signature
      description: >-
        HMAC-SHA256 over canonical request string. Format:
        v1.<unix_seconds>.<hex_hmac_sha256>.
    PartnerSlug:
      type: apiKey
      in: header
      name: X-Partner-Id
      description: Partner identifier slug. Required alongside X-Signature for HMAC auth.
    PersonalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: flx_pat_...
      description: 'User-issued personal access token (format: flx_pat_<token>).'
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Partner API key (format: ak_<token>). Alternative to HMAC for simpler
        integrations.
    OAuth2DPoP:
      type: http
      scheme: DPoP
      description: >-
        DPoP-bound OAuth2 access token (RFC 9449). Issued by the /oauth/token
        endpoint when the client is registered with
        dpop_bound_access_tokens=true. Each protected request must include a
        fresh DPoP proof JWT in the DPoP header. Token format: flx_at_<token>.
    OAuth2DPoPProof:
      type: apiKey
      in: header
      name: DPoP
      description: >-
        RFC 9449 DPoP proof JWT. Required on every request that presents
        Authorization: DPoP <access_token>. Must carry fresh iat, jti, htm
        matching the request method, htu matching the request URL, and ath
        matching SHA-256 of the access token.
    OAuth2Bearer:
      type: http
      scheme: bearer
      bearerFormat: flx_at_...
      description: >-
        OAuth2 access token issued via the authorization-code + PKCE flow
        (format: flx_at_<token>). Grants the partner user-scoped access to act
        on behalf of the consenting end-user.

````