Skip to main content
POST
/
leaderboards
/
{id}
/
scores
Update player score on leaderboard
curl --request POST \
  --url https://api.engagefabric.com/leaderboards/{id}/scores \
  --header 'Content-Type: application/json' \
  --data '
{
  "playerId": "player-uuid",
  "externalUserId": "user-123",
  "score": 1000,
  "operation": "set",
  "displayName": "John Doe",
  "avatarUrl": "https://cdn.example.com/avatars/user-123.png",
  "metadata": {
    "achievementId": "first-win"
  }
}
'

Path Parameters

id
string
required

Leaderboard ID

Body

application/json
playerId
string
required

Player ID

Example:

"player-uuid"

externalUserId
string
required

External user ID from client system

Example:

"user-123"

score
number
required

Score value

Example:

1000

operation
enum<string>
default:set
required

Operation type: set absolute value or increment

Available options:
set,
increment
displayName
string

Player display name (for caching)

Example:

"John Doe"

avatarUrl
string

Player avatar URL (for caching)

Example:

"https://cdn.example.com/avatars/user-123.png"

metadata
object

Additional metadata

Example:
{ "achievementId": "first-win" }

Response

Score updated successfully