> ## 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.

# Create a sideboard guide

> Creates a sideboard guide for the authenticated user. The caller must own the deck referenced by ``deck_id``; otherwise the request is rejected with ``403 FLEXSLOT_NOT_DECK_OWNER``. Nested ``matchups`` and ``attached_deck_ids`` arrays are optional. The primary deck attachment is auto-created by the post_save signal.



## OpenAPI

````yaml /openapi.json post /api/public/v1/games/{game}/sideboard-guides
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}/sideboard-guides:
    post:
      tags:
        - Sideboard Guides
      summary: Create a sideboard guide
      description: >-
        Creates a sideboard guide for the authenticated user. The caller must
        own the deck referenced by ``deck_id``; otherwise the request is
        rejected with ``403 FLEXSLOT_NOT_DECK_OWNER``. Nested ``matchups`` and
        ``attached_deck_ids`` arrays are optional. The primary deck attachment
        is auto-created by the post_save signal.
      operationId: games_sideboard_guides_create
      parameters:
        - in: path
          name: game
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicSideboardGuideCreateRequestRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PublicSideboardGuideCreateRequestRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PublicSideboardGuideCreateRequestRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicSideboardGuideDetail'
          description: ''
        '400':
          description: No response body
        '401':
          description: No response body
        '403':
          description: No response body
        '404':
          description: No response body
      security:
        - PartnerHmac: []
          PartnerSlug: []
          PersonalAccessToken: []
        - PartnerHmac: []
          PartnerSlug: []
        - ApiKey: []
        - PersonalAccessToken: []
        - OAuth2DPoP: []
          OAuth2DPoPProof: []
        - OAuth2Bearer: []
components:
  schemas:
    PublicSideboardGuideCreateRequestRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
        deck_id:
          type: string
          format: uuid
        description:
          type: string
          nullable: true
        notes:
          type: string
          nullable: true
          maxLength: 500000
        visibility:
          type: array
          items:
            type: string
            minLength: 1
        tags:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 50
        format:
          type: string
          maxLength: 50
        thumbnail:
          type: string
          nullable: true
          maxLength: 255
        youtube_url:
          type: string
          format: uri
          maxLength: 500
        premium:
          type: boolean
        is_archived:
          type: boolean
        matchups:
          type: array
          items:
            $ref: '#/components/schemas/PublicSideboardGuideMatchupRequest'
        attached_deck_ids:
          type: array
          items:
            type: string
            format: uuid
      required:
        - deck_id
        - name
    PublicSideboardGuideDetail:
      type: object
      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
        deck_id:
          type: string
          format: uuid
          readOnly: true
        format:
          type: string
          readOnly: true
        views:
          type: integer
          readOnly: true
        likes:
          type: integer
          readOnly: true
        hasMatchups:
          type: boolean
          readOnly: true
        thumbnail:
          type: string
          nullable: true
          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
        description:
          type: string
          nullable: true
          readOnly: true
        notes:
          type: string
          nullable: true
          readOnly: true
        youtube_url:
          type: string
          format: uri
          readOnly: true
          nullable: true
        premium:
          type: boolean
          readOnly: true
        is_archived:
          type: boolean
          readOnly: true
        tags:
          type: array
          items:
            type: string
          readOnly: true
        matchups:
          type: array
          items:
            type: object
          readOnly: true
        decks:
          type: array
          items:
            type: object
          readOnly: true
        attached_deck_ids:
          type: array
          items:
            type: string
          readOnly: true
      required:
        - attached_deck_ids
        - author
        - createdAt
        - deck_id
        - decks
        - description
        - editedAt
        - format
        - game
        - hasMatchups
        - id
        - is_archived
        - likes
        - matchups
        - name
        - notes
        - premium
        - sourceProvider
        - tags
        - thumbnail
        - views
        - visibility
        - youtube_url
    PublicSideboardGuideMatchupRequest:
      type: object
      properties:
        opponent_deck_name:
          type: string
          minLength: 1
          maxLength: 255
        opponent_archetype:
          type: string
          maxLength: 100
        difficulty:
          $ref: '#/components/schemas/DifficultyEnum'
        notes:
          type: string
          nullable: true
          maxLength: 50000
        play_notes:
          type: string
          nullable: true
          maxLength: 50000
        draw_notes:
          type: string
          nullable: true
          maxLength: 50000
        sort_order:
          type: integer
        thumbnail:
          type: string
          nullable: true
          maxLength: 255
        is_featured:
          type: boolean
      required:
        - opponent_deck_name
    DifficultyEnum:
      enum:
        - VERY_EASY
        - EASY
        - MEDIUM
        - HARD
        - VERY_HARD
      type: string
      description: |-
        * `VERY_EASY` - VERY_EASY
        * `EASY` - EASY
        * `MEDIUM` - MEDIUM
        * `HARD` - HARD
        * `VERY_HARD` - VERY_HARD
  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.

````