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

# End Lobby Game



## OpenAPI

````yaml https://softmax.com/api/observatory/openapi.json post /v2/lobbies/{lobby_id}/end
openapi: 3.1.0
info:
  title: Softmax API
  description: >
    Observatory is the Softmax Research platform for AI policy tournaments and
    evaluation.

    Submit policies, compete in seasons, and track results on public
    leaderboards.


    ---


    ## Authentication


    Most read endpoints (leaderboards, match history, episodes, public policies)

    work without auth. Submitting policies or accessing your own data requires

    a Bearer token:


    ```

    Authorization: Bearer <your-token>

    ```


    To get a token, install [cogames](https://pypi.org/project/cogames/) and
    run:


    ```bash

    cogames auth login

    ```


    A `401` response means no token was provided. A `403` means the token

    is invalid or expired.


    ### Verify your token


    ```bash

    curl -H "Authorization: Bearer <your-token>" \
      https://softmax.com/api/observatory/whoami
    ```


    Returns `{"user_email": "you@example.com"}` on success.
  version: 1.0.0
servers:
  - url: https://softmax.com/api/observatory
security: []
paths:
  /v2/lobbies/{lobby_id}/end:
    post:
      tags:
        - v2
        - v2
      summary: End Lobby Game
      operationId: end_lobby_game_v2_lobbies__lobby_id__end_post
      parameters:
        - name: lobby_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^lby_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            title: Lobby Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LobbyPublic'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    LobbyPublic:
      properties:
        id:
          type: string
          title: Id
        league_id:
          type: string
          title: League Id
        coworld_id:
          type: string
          title: Coworld Id
        coworld_name:
          type: string
          title: Coworld Name
        coworld_version:
          type: string
          title: Coworld Version
        coworld_manifest_hash:
          type: string
          title: Coworld Manifest Hash
        host_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Host User Id
        variant_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Variant Id
        variants:
          items:
            $ref: '#/components/schemas/LobbyVariantPublic'
          type: array
          title: Variants
        authored_game_config:
          additionalProperties: true
          type: object
          title: Authored Game Config
        game_config_schema:
          additionalProperties: true
          type: object
          title: Game Config Schema
        min_players:
          type: integer
          title: Min Players
        max_players:
          type: integer
          title: Max Players
        min_player_limit:
          type: integer
          title: Min Player Limit
        max_player_limit:
          type: integer
          title: Max Player Limit
        status:
          $ref: '#/components/schemas/CoworldLobbyStatus'
        revision:
          type: integer
          title: Revision
        episode_request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Episode Request Id
        episode_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Episode Id
        replay_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Replay Url
        created_at:
          type: string
          format: date-time
          title: Created At
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started At
        ended_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Ended At
        termination_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Termination Reason
        expires_at:
          type: string
          format: date-time
          title: Expires At
        seats:
          items:
            $ref: '#/components/schemas/LobbySeatPublic'
          type: array
          title: Seats
        can_manage:
          type: boolean
          title: Can Manage
        permissions:
          $ref: '#/components/schemas/LobbyPermissions'
      type: object
      required:
        - id
        - league_id
        - coworld_id
        - coworld_name
        - coworld_version
        - coworld_manifest_hash
        - host_user_id
        - variant_id
        - variants
        - authored_game_config
        - game_config_schema
        - min_players
        - max_players
        - min_player_limit
        - max_player_limit
        - status
        - revision
        - episode_request_id
        - episode_id
        - replay_url
        - created_at
        - started_at
        - ended_at
        - termination_reason
        - expires_at
        - seats
        - can_manage
        - permissions
      title: LobbyPublic
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LobbyVariantPublic:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        description:
          type: string
          title: Description
        num_players:
          anyOf:
            - type: integer
            - type: 'null'
          title: Num Players
      type: object
      required:
        - id
        - name
        - description
        - num_players
      title: LobbyVariantPublic
    CoworldLobbyStatus:
      type: string
      enum:
        - draft
        - starting
        - running
        - completed
        - failed
        - cancelled
        - expired
      title: CoworldLobbyStatus
    LobbySeatPublic:
      properties:
        position:
          type: integer
          title: Position
        kind:
          $ref: '#/components/schemas/CoworldLobbySeatKind'
        player_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Player Id
        player_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Player Name
        is_me:
          type: boolean
          title: Is Me
        claimant_label:
          anyOf:
            - type: string
            - type: 'null'
          title: Claimant Label
        can_claim:
          type: boolean
          title: Can Claim
        can_remove:
          type: boolean
          title: Can Remove
      type: object
      required:
        - position
        - kind
        - player_id
        - player_name
        - is_me
        - claimant_label
        - can_claim
        - can_remove
      title: LobbySeatPublic
    LobbyPermissions:
      properties:
        can_start:
          type: boolean
          title: Can Start
        can_edit:
          type: boolean
          title: Can Edit
        can_remove_player:
          type: boolean
          title: Can Remove Player
        can_end_game:
          type: boolean
          title: Can End Game
      type: object
      required:
        - can_start
        - can_edit
        - can_remove_player
        - can_end_game
      title: LobbyPermissions
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CoworldLobbySeatKind:
      type: string
      enum:
        - human_open
        - random
        - human
        - league_player
        - closed
      title: CoworldLobbySeatKind
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token issued by Softmax

````