Authorization headerleaderboardcommunityID401 if missing, invalid, or insufficientupdate:leaderboard command through the partner publisher pathduration objectslug must be unique per community and match lowercase letters, numbers, and hyphensrankingField, displayedColumns, startDate, endDate, hasNoEndDate, isEnabled, and isPreviewEnabledstartDate when repairing or changing schedule data so the UI can read the duration correctlydisplayedColumns has max 50 itemsallowedTimeFilters values are all-time, daily, weekly, monthly, or yearlywidget.whitelistedDomains has max 50 domains{
"name": "April Last Leaderboard",
"slug": "april-last-leaderboard",
"description": "Monthly leaderboard updated through the partner API.",
"image": "https://cdn.example.com/leaderboards/april.png",
"rankingField": "currencies",
"displayedColumns": [
{ "column": "user", "visible": true, "order": 0 },
{ "column": "currencies", "visible": true, "order": 1 }
],
"topRankOnly": false,
"topRankLimit": 10,
"onlyPositiveRanks": false,
"includeDummyUsers": false,
"startDate": "2026-01-30T19:30:00.000Z",
"endDate": "2026-12-31T23:59:59.999Z",
"hasNoEndDate": true,
"timeZone": 5.3,
"startTime": { "hours": 5, "minutes": 0, "ampm": "AM" },
"endTime": { "hours": 11, "minutes": 59, "ampm": "PM" },
"allowedTimeFilters": ["all-time", "monthly", "weekly"],
"allowedUsersToRank": [],
"allowedRolesToRank": ["507f1f77bcf86cd799439014"],
"allowedTagsToRank": [],
"allowedUsersToView": [],
"allowedRolesToView": ["507f1f77bcf86cd799439014"],
"allowedTagsToView": [],
"isEnabled": true,
"isPreviewEnabled": false,
"displayOrder": 3,
"widget": {
"enabled": false,
"whitelistedDomains": ["example.com"],
"size": { "type": "custom", "value": { "width": 420, "height": 640 } },
"button": { "enabled": true, "text": "View leaderboard", "link": "https://example.com/leaderboard" }
}
}curl --location --request PATCH 'https://api.returning.ai/v1/leaderboards/507f1f77bcf86cd799439012' \
--header 'Authorization: Bearer XXXXXX' \
--header 'Content-Type: application/json' \
--data '{
"name": "April Last Leaderboard",
"slug": "april-last-leaderboard",
"description": "Monthly leaderboard updated through the partner API.",
"image": "https://cdn.example.com/leaderboards/april.png",
"rankingField": "currencies",
"displayedColumns": [
{
"column": "user",
"visible": true,
"order": 0
},
{
"column": "currencies",
"visible": true,
"order": 1
}
],
"topRankOnly": false,
"topRankLimit": 10,
"onlyPositiveRanks": false,
"includeDummyUsers": false,
"startDate": "2026-01-30T19:30:00.000Z",
"endDate": "2026-12-31T23:59:59.999Z",
"hasNoEndDate": true,
"timeZone": 5.3,
"startTime": {
"hours": 5,
"minutes": 0,
"ampm": "AM"
},
"endTime": {
"hours": 11,
"minutes": 59,
"ampm": "PM"
},
"allowedTimeFilters": [
"all-time",
"monthly",
"weekly"
],
"allowedUsersToRank": [],
"allowedRolesToRank": [
"507f1f77bcf86cd799439014"
],
"allowedTagsToRank": [],
"allowedUsersToView": [],
"allowedRolesToView": [
"507f1f77bcf86cd799439014"
],
"allowedTagsToView": [],
"isEnabled": true,
"isPreviewEnabled": false,
"displayOrder": 3,
"widget": {
"enabled": false,
"whitelistedDomains": [
"example.com"
],
"size": {
"type": "custom",
"value": {
"width": 420,
"height": 640
}
},
"button": {
"enabled": true,
"text": "View leaderboard",
"link": "https://example.com/leaderboard"
}
}
}'{
"meta": {
"status": "success",
"statusCode": 200
},
"message": "Update leaderboard success.",
"data": {
"_id": "507f1f77bcf86cd799439012",
"communityID": "6502c97314a3e564c5bbfa84",
"name": "April Last Leaderboard",
"slug": "april-last-leaderboard",
"description": "Monthly leaderboard updated through the partner API.",
"image": "https://cdn.example.com/leaderboards/april.png",
"rankBy": "currencies",
"displayedFields": [
"user",
"currencies"
],
"displayFieldsOrder": [
"user",
"currencies"
],
"timeFilters": [
"all-time",
"monthly",
"weekly"
],
"performanceDisplay": {
"showTop": {
"enabled": false,
"value": 10
},
"showPositive": {
"enabled": false
},
"showDummy": {
"enabled": false
}
},
"duration": {
"start": "2026-01-30T19:30:00.000Z",
"end": "2026-12-31T23:59:59.999Z",
"noEndDate": true,
"timeZone": 5.3,
"startTime": {
"hours": 5,
"minutes": 0,
"ampm": "AM"
},
"endTime": {
"hours": 11,
"minutes": 59,
"ampm": "PM"
}
},
"rankedUserRoles": {
"users": [],
"roles": [
"507f1f77bcf86cd799439014"
],
"tags": []
},
"viewPermissionUserRoles": {
"users": [],
"roles": [
"507f1f77bcf86cd799439014"
],
"tags": []
},
"widget": {
"enabled": false,
"whitelistedDomains": [
"example.com"
],
"size": {
"type": "custom",
"value": {
"width": 420,
"height": 640
}
},
"button": {
"enabled": true,
"text": "View leaderboard",
"link": "https://example.com/leaderboard"
}
},
"enabled": true,
"previewEnabled": false,
"displayOrder": 3,
"selected": false,
"updatedAt": "2026-04-13T12:30:00.000Z",
"createdAt": "2026-04-13T12:00:00.000Z"
}
}