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

# Create Tournament

> Create a new tournament

Create a new tournament with specified configuration including game type, player limits, entry fees, and prize distribution. The tournament will be created in 'scheduled' status and can be modified until it starts.


## OpenAPI

````yaml POST /api/tournaments
openapi: 3.1.0
info:
  title: Tournament Platform API
  description: >-
    Comprehensive API for managing real-time multiplayer tournaments with Game
    Platform integration. Includes both external Casino Integration APIs and
    internal Game Platform APIs.
  version: 1.0.0
  license:
    name: MIT
  contact:
    name: Tournament Platform Support
    url: https://ts.playservices.tech/
    email: support@playservices.tech
servers:
  - url: https://ts.playservices.tech/api
    description: Production server
security:
  - OperatorAPIKey: []
  - InternalAPIKey: []
paths:
  /api/tournaments:
    post:
      tags:
        - Casino Integration - Tournaments
      summary: Create tournament
      description: Create a new tournament
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTournamentRequest'
      responses:
        '201':
          description: Tournament created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TournamentCreationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - OperatorAPIKey: []
components:
  schemas:
    CreateTournamentRequest:
      type: object
      required:
        - name
        - external_id
        - game
        - scheduled_start
        - entry_fee
      properties:
        name:
          type: string
          example: Test Tournament
        external_id:
          type: string
          example: EXT_001
        game:
          type: string
          example: crash-classic
        scheduled_start:
          type: string
          format: date-time
        max_players:
          type: integer
          minimum: 1
          nullable: true
          example: 50
          description: Maximum players (null for unlimited capacity)
        min_players:
          type: integer
          minimum: 1
          example: 5
        entry_fee:
          type: number
          minimum: 0
          example: 10.5
        prize_pool:
          type: object
          properties:
            total:
              type: number
              example: 500
            distribution:
              type: object
              additionalProperties:
                type: number
              example:
                '1': 50
                '2': 30
                '3': 20
          required:
            - total
        config:
          type: object
          example:
            tournament_type: points_based
    TournamentCreationResponse:
      type: object
      properties:
        tournament_id:
          type: string
        status:
          type: string
        estimated_prize_pool:
          type: number
        tournament:
          $ref: '#/components/schemas/Tournament'
    Tournament:
      type: object
      properties:
        tournamentId:
          type: string
          example: '12345'
        name:
          type: string
          example: Daily Championship
        gameSlug:
          type: string
          example: crash-classic
        status:
          type: string
          enum:
            - scheduled
            - in_progress
            - completed
            - cancelled
        scheduledStart:
          type: string
          format: date-time
        actualStartTime:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
        maxPlayers:
          type: integer
          example: 100
        currentPlayers:
          type: integer
          example: 87
        entryFee:
          type: number
          example: 10
        currency:
          type: string
          example: USD
        prizePool:
          $ref: '#/components/schemas/PrizePool'
        gameConfig:
          type: object
        createdAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
    PrizePool:
      type: object
      properties:
        totalAmount:
          type: number
          example: 870
        currency:
          type: string
          example: USD
        guaranteedPrize:
          type: number
          example: 500
        distribution:
          type: object
          additionalProperties:
            type: number
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication failed or insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Request conflicts with current state
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    OperatorAPIKey:
      type: http
      scheme: bearer
      description: >-
        Operator API key with role-based permissions (tournaments.read,
        players.write, etc.)
    InternalAPIKey:
      type: apiKey
      in: header
      name: X-Internal-Api-Key
      description: Internal API key for Game Platform integration

````