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

# Update player score on leaderboard



## OpenAPI

````yaml /api-reference/openapi.json post /leaderboards/{id}/scores
openapi: 3.0.0
info:
  title: EngageFabric API
  description: >-
    EngageFabric is a multi-tenant SaaS gamification framework. This API
    provides endpoints for managing players, tracking events, quests,
    adventures, leaderboards, lobbies, and real-time features.
  version: 1.0.0
  contact:
    name: EngageFabric Support
    url: https://engagefabric.com
    email: support@engagefabric.com
  license:
    name: Proprietary
    url: https://engagefabric.com/terms
servers:
  - url: https://api.engagefabric.com
    description: Production
  - url: http://localhost:3000
    description: Development
security: []
tags:
  - name: auth
    description: Authentication endpoints
  - name: tenants
    description: Tenant management
  - name: projects
    description: Project management
  - name: players
    description: Player management and game state
  - name: events
    description: Event ingestion and tracking
  - name: quests
    description: Quest management and progress
  - name: adventures
    description: Adventure/season management
  - name: leaderboards
    description: Leaderboard rankings
  - name: lobbies
    description: Multiplayer lobby management
  - name: chat
    description: Real-time chat
  - name: rules
    description: Rules engine configuration
paths:
  /leaderboards/{id}/scores:
    post:
      tags:
        - Leaderboards
      summary: Update player score on leaderboard
      operationId: LeaderboardController_updateScore
      parameters:
        - name: id
          required: true
          in: path
          description: Leaderboard ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScoreDto'
      responses:
        '200':
          description: Score updated successfully
        '404':
          description: Leaderboard not found
      security:
        - bearer: []
components:
  schemas:
    UpdateScoreDto:
      type: object
      properties:
        playerId:
          type: string
          description: Player ID
          example: player-uuid
        externalUserId:
          type: string
          description: External user ID from client system
          example: user-123
        score:
          type: number
          description: Score value
          example: 1000
        operation:
          type: string
          description: 'Operation type: set absolute value or increment'
          enum:
            - set
            - increment
          default: set
        displayName:
          type: string
          description: Player display name (for caching)
          example: John Doe
        avatarUrl:
          type: string
          description: Player avatar URL (for caching)
          example: https://cdn.example.com/avatars/user-123.png
        metadata:
          type: object
          description: Additional metadata
          example:
            achievementId: first-win
      required:
        - playerId
        - externalUserId
        - score
        - operation

````