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

# Start game



## OpenAPI

````yaml openapi/game-v1.json POST /v1/games/{gameId}/start
openapi: 3.0.4
info:
  title: Game.WebService
  version: v1
servers:
  - url: https://{host}/game
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/games/{gameId}/start:
    post:
      tags:
        - Game
      summary: Start game
      parameters:
        - name: gameId
          in: path
          description: Game id
          required: true
          schema:
            type: integer
            format: int64
        - name: memberId
          in: header
          description: Member id
          required: true
          schema:
            pattern: (?=\s*\S)^[\S\s]{1,36}$
            type: string
        - name: sessionData
          in: header
          description: >-
            Optional data to include into session id. 

            This data is then passed to Promotion service when assigning
            rewards.
          schema:
            maxLength: 256
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartGameResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
components:
  schemas:
    StartGameResponse:
      required:
        - attemptId
        - gameType
        - gameUrl
      type: object
      properties:
        gameUrl:
          type: string
          description: >-
            URL of the webview for the game. Ready to be opened in the app or
            browser to show the gameplay.
          format: uri
        attemptId:
          minLength: 1
          type: string
          description: >-
            Unique identifier for the attempt. Used in Gameplay for correlation
            with game data
        gameType:
          $ref: '#/components/schemas/GameType'
        tags:
          type: array
          items:
            type: string
          description: Tags assigned to the game.
          nullable: true
      additionalProperties: false
    WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: string
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    GameType:
      enum:
        - withLogistic
        - withoutLogistic
        - dailyGame
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        Opaque Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````