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

# Update Play Session Config



## OpenAPI

````yaml https://softmax.com/api/observatory/openapi.json put /v2/coworlds/play/session/{session_id}/config
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/coworlds/play/session/{session_id}/config:
    put:
      tags:
        - coworlds
      summary: Update Play Session Config
      operationId: >-
        update_play_session_config_v2_coworlds_play_session__session_id__config_put
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^ps_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/PlaySessionCoworldUpdate'
                - $ref: '#/components/schemas/PlaySessionVariantUpdate'
                - $ref: '#/components/schemas/PlaySessionGameConfigUpdate'
                - $ref: '#/components/schemas/PlaySessionSpectatorsUpdate'
              discriminator:
                propertyName: kind
                mapping:
                  coworld:
                    $ref: '#/components/schemas/PlaySessionCoworldUpdate'
                  variant:
                    $ref: '#/components/schemas/PlaySessionVariantUpdate'
                  game_config:
                    $ref: '#/components/schemas/PlaySessionGameConfigUpdate'
                  spectators:
                    $ref: '#/components/schemas/PlaySessionSpectatorsUpdate'
              title: Request
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlaySessionStateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    PlaySessionCoworldUpdate:
      properties:
        kind:
          type: string
          const: coworld
          title: Kind
        coworld_id:
          type: string
          pattern: ^cow_[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
          title: Coworld Id
      additionalProperties: false
      type: object
      required:
        - kind
        - coworld_id
      title: PlaySessionCoworldUpdate
    PlaySessionVariantUpdate:
      properties:
        kind:
          type: string
          const: variant
          title: Kind
        variant_id:
          type: string
          title: Variant Id
      additionalProperties: false
      type: object
      required:
        - kind
        - variant_id
      title: PlaySessionVariantUpdate
    PlaySessionGameConfigUpdate:
      properties:
        kind:
          type: string
          const: game_config
          title: Kind
        game_config:
          additionalProperties: true
          type: object
          title: Game Config
      additionalProperties: false
      type: object
      required:
        - kind
        - game_config
      title: PlaySessionGameConfigUpdate
    PlaySessionSpectatorsUpdate:
      properties:
        kind:
          type: string
          const: spectators
          title: Kind
        allow_spectators:
          type: boolean
          title: Allow Spectators
      additionalProperties: false
      type: object
      required:
        - kind
        - allow_spectators
      title: PlaySessionSpectatorsUpdate
    PlaySessionStateResponse:
      properties:
        coworld_id:
          type: string
          title: Coworld Id
        game_name:
          type: string
          title: Game Name
        variant_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Variant Id
        game_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Game Config
        player_count:
          type: integer
          title: Player Count
        slots_filled:
          type: integer
          title: Slots Filled
        allow_spectators:
          type: boolean
          title: Allow Spectators
        global_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Global Url
        status:
          type: string
          title: Status
        can_manage:
          type: boolean
          title: Can Manage
          default: false
        viewer_target_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Viewer Target Url
        players:
          items:
            $ref: '#/components/schemas/PlaySessionPlayerResponse'
          type: array
          title: Players
        spectators:
          items:
            $ref: '#/components/schemas/PlaySessionSpectatorResponse'
          type: array
          title: Spectators
        can_configure_game:
          type: boolean
          title: Can Configure Game
          default: false
      type: object
      required:
        - coworld_id
        - game_name
        - variant_id
        - player_count
        - slots_filled
        - allow_spectators
        - global_url
        - status
      title: PlaySessionStateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PlaySessionPlayerResponse:
      properties:
        slot:
          type: integer
          title: Slot
        label:
          type: string
          title: Label
        slot_kind:
          type: string
          enum:
            - human
            - policy
            - closed
          title: Slot Kind
          default: human
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
        player_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Player Id
        player_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Player Name
        policy_version_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Policy Version Id
        policy_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Policy Name
        policy_version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Policy Version
        joined_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Joined At
        is_viewer:
          type: boolean
          title: Is Viewer
          default: false
      type: object
      required:
        - slot
        - label
      title: PlaySessionPlayerResponse
    PlaySessionSpectatorResponse:
      properties:
        label:
          type: string
          title: Label
        player_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Player Id
        player_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Player Name
        joined_at:
          type: string
          format: date-time
          title: Joined At
        is_viewer:
          type: boolean
          title: Is Viewer
          default: false
      type: object
      required:
        - label
        - joined_at
      title: PlaySessionSpectatorResponse
    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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer token issued by Softmax

````