Leaderboards Admin API
Introduction
This is the API specification for the Unity Leaderboards Admin service that enables
game developers to create and edit leaderboard configurations for their games.
General Information
A leaderboard configuration can be created and edited through this API. In addition, player scores
can be retrieved (either as a set of leaderboard entries or for a particular player) and deleted, and
leaderboards may be reset, optionally retaining a read-only version of the scores stored in the leaderboard
at the time of the reset.
Rate Limits
The API has rate limiting in place. Request are limited to 10 requests per second, and 1000 requests per 30 minute period.
The API responds with a HTTP status code if the rate limit is
exceeded.
429It will also respond with a header to be used in conjunction with a client's retry logic.
The value is the number of seconds until a request for the given player will be accepted.
Retry-AfterDownload OpenAPI specification:
Create Leaderboard
Add leaderboard to project environment
Authorizations
ServiceAccount (live_ops.leaderboards.configurations.create)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.configurations.create
Path parameters for "{title}"
The project's Project ID
Request body for "{title}"
Media Type:
application/jsonConfigure bucketing on the leaderboard by specifying the maximum bucket size. A bucketed leaderboard
segments players into buckets of the specified size, assigning players to buckets on a first come, first serve
basis. Buckets aren't visible to players. Note that you can't change this configuration after you've created the leaderboard.
The date and time that the first reset should occur, formatted according to the RFC-3339 specification.
If is provided without a schedule, then a one-off reset will occur at the date and time specified by . The date and time specified by must
be later that the time of the request. Accuracy of the date and time is maintained to the minute.
startstartstartstartThe schedule on which to reset the leaderboard. Can be either a valid five-element cron tab or a cron string using shorthand
(see Cron Package Specifications for details), e.g. "@every 72h" for a leaderboard reset every three days.
The schedule will be applied after the first reset specified by . The schedule can not be more frequent than once per minute.
@everystartExactly one tier in the array must omit this value to act as the default tier.
tiersThe worst value to include in the tier. For score-based tiers, this relates to your sort order. For a descending leaderboard,
the tier includes entries with this score and higher. For an ascending leaderboard, the tier includes entries with this score and lower.
For rank and percentage-based tiers, the tier includes entries with this rank or percentage and better. Percentage-based cutoffs are like
rank-based cutoffs that scale with your number of players. For example, if you specify a percentage-based cutoff of , a leaderboard of 100 players would include ranks 0-9
in the tier, whereas with 1000 players the tier would include ranks 0-99. Specify percentage-based cutoffs as the percentage desired without
the percent symbol, e.g. for 10%.
1010Code samples for "{title}":
Request example
curl -X POST \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '{ "id": "my-leaderboard", "name": "My Leaderboard", "sortOrder": "desc", "updateType": "keepBest", "bucketSize": 0, "resetConfig": { "start": "2025-07-08T15:04:05Z", "schedule": "@every 1h", "archive": true }, "tieringConfig": { "strategy": "score", "tiers": [ { "id": "gold", "cutoff": 100 }, { "id": "silver", "cutoff": 50 }, { "id": "bronze" } ] }}' \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards"
Response example
{ "type": "string", "title": "Bad Request", "status": 400, "code": 1002, "detail": "Failed to parse request body. Error: Unexpected end of JSON input", "instance": "string"}
Get Leaderboard Configs
List leaderboard configurations for the given project environment
Authorizations
ServiceAccount (live_ops.leaderboards.configurations.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.configurations.list
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards"
Response example
{ "results": [ { "updated": "2024-01-01T00:00:00Z", "created": "2024-01-01T00:00:00Z", "lastReset": "2024-01-01T00:00:00Z", "versions": [ { "id": "20230213175322850781977", "start": "2024-01-01T00:00:00Z", "end": "2024-01-01T00:00:00Z" } ] } ], "pageInfo": { "endCursor": "my-leaderboard" }}
Get Leaderboard Config
Retrieves the configuration for a specific leaderboard
Authorizations
ServiceAccount (live_ops.leaderboards.configurations.get)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.configurations.get
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}"
Response example
{ "updated": "2024-01-01T00:00:00Z", "created": "2024-01-01T00:00:00Z", "lastReset": "2024-01-01T00:00:00Z", "versions": [ { "id": "20230213175322850781977", "start": "2024-01-01T00:00:00Z", "end": "2024-01-01T00:00:00Z" } ]}
Update Leaderboard Config
Updates the configuration for a specific leaderboard
Authorizations
ServiceAccount (live_ops.leaderboards.configurations.update)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.configurations.update
Path parameters for "{title}"
The project's Project ID
Request body for "{title}"
Media Type:
application/jsonThe date and time that the first reset should occur, formatted according to the RFC-3339 specification.
If is provided without a schedule, then a one-off reset will occur at the date and time specified by . The date and time specified by must
be later that the time of the request. Accuracy of the date and time is maintained to the minute.
startstartstartstartThe schedule on which to reset the leaderboard. Can be either a valid five-element cron tab or a cron string using shorthand
(see Cron Package Specifications for details), e.g. "@every 72h" for a leaderboard reset every three days.
The schedule will be applied after the first reset specified by . The schedule can not be more frequent than once per minute.
@everystartExactly one tier in the array must omit this value to act as the default tier.
tiersThe worst value to include in the tier. For score-based tiers, this relates to your sort order. For a descending leaderboard,
the tier includes entries with this score and higher. For an ascending leaderboard, the tier includes entries with this score and lower.
For rank and percentage-based tiers, the tier includes entries with this rank or percentage and better. Percentage-based cutoffs are like
rank-based cutoffs that scale with your number of players. For example, if you specify a percentage-based cutoff of , a leaderboard of 100 players would include ranks 0-9
in the tier, whereas with 1000 players the tier would include ranks 0-99. Specify percentage-based cutoffs as the percentage desired without
the percent symbol, e.g. for 10%.
1010Code samples for "{title}":
Request example
curl -X PATCH \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ -H "Content-Type: application/json" \ -d '{ "name": "My Leaderboard", "sortOrder": "desc", "updateType": "keepBest", "resetConfig": { "start": "2025-07-08T15:04:05Z", "schedule": "@every 1h", "archive": true }, "tieringConfig": { "strategy": "score", "tiers": [ { "id": "gold", "cutoff": 100 }, { "id": "silver", "cutoff": 50 }, { "id": "bronze" } ] }}' \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}"
Response example
{ "type": "string", "title": "Bad Request", "status": 400, "code": 1002, "detail": "Failed to parse request body. Error: Unexpected end of JSON input", "instance": "string"}
Delete Leaderboard
Deletes the configuration and scores for a specific leaderboard
Authorizations
ServiceAccount (live_ops.leaderboards.configurations.delete)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.configurations.delete
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X DELETE \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}"
Response example
{ "type": "problems/basic", "title": "Unauthorized", "status": 401, "code": 1005, "detail": "Unauthorized"}
Get Bucket IDs
Retrieves the bucket IDs for a specific bucketed leaderboard
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/buckets"
Response example
{ "offset": 0, "limit": 10, "total": 1, "results": [ "8bdacc33-6eef-4577-beb0-633c86259f5b" ]}
Get Scores
Get list of scores and ranks for the specified leaderboard, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/scores"
Response example
{ "offset": 0, "limit": 10, "total": 1, "results": [ { "playerId": "5drhidte8XgD4658j2eHtSljIAzA", "playerName": "Jane Doe", "score": 120.3, "rank": 42, "tier": "gold" } ]}
Reset Scores
Reset the scores for the specified leaderboard, optionally archiving the existing scores before resetting. When archiving, the operation will return the version ID of the archive version that has been created. Each leaderboard can have up to 10,000 archives. Beyond this limit, the system will automatically delete the oldest archives on a first-in, first-out (FIFO) basis.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.delete)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.delete
Path parameters for "{title}"
The project's Project ID
Get Scores By Tier
Get list of scores and ranks for the specified leaderboard, within the specified tier, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Get Bucket Scores
Get list of scores and ranks for the specified bucket from the specified leaderboard, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/buckets/{bucketId}/scores"
Response example
{ "offset": 0, "limit": 10, "total": 1, "results": [ { "playerId": "5drhidte8XgD4658j2eHtSljIAzA", "playerName": "Jane Doe", "score": 120.3, "rank": 42, "tier": "gold" } ]}
Get Bucket Scores By Tier
Get list of scores and ranks for the specified bucket from the specified leaderboard, within the specified tier, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/buckets/{bucketId}/tiers/{tierId}/scores"
Response example
{ "tier": "gold"}
Get Scores By PlayerIds
Get list of scores and ranks for the specified leaderboard, with specified playerIds.
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "playerIds": [ "5drhidte8XgD4658j2eHtSljIAzA", "GZWIdLM4I1vFvv1VGhqqDKNPK06b" ]}' \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/scores/players"
Response example
{ "results": [ { "playerId": "5drhidte8XgD4658j2eHtSljIAzA", "playerName": "Jane Doe", "score": 120.3, "rank": 42, "tier": "gold" } ], "entriesNotFoundForPlayerIds": [ "GZWIdLM4I1vFvv1VGhqqDKNPK06b" ]}
Get Scores By PlayerIds for Archived Leaderboard
Get list of scores and ranks for an archived leaderboard, with specified playerIds.
Code samples for "{title}":
Request example
curl -X POST \ -H "Content-Type: application/json" \ -d '{ "playerIds": [ "5drhidte8XgD4658j2eHtSljIAzA", "GZWIdLM4I1vFvv1VGhqqDKNPK06b" ]}' \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}/scores/players"
Response example
{ "version": { "id": "20230213175322850781977", "start": "2024-01-01T00:00:00Z", "end": "2024-01-01T00:00:00Z" }}
Get Player Range
Get the list of neighbouring players for the specified player Id.
Code samples for "{title}":
Request example
curl -X GET \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/scores/players/{playerId}/range"
Response example
{ "results": [ { "playerId": "5drhidte8XgD4658j2eHtSljIAzA", "playerName": "Jane Doe", "score": 120.3, "rank": 42, "tier": "gold" } ]}
Get Player Range for Archived Leaderboard
Get the list of neighbouring players for the specified player Id for an archived leaderboard.
Code samples for "{title}":
Request example
curl -X GET \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}/scores/players/{playerId}/range"
Response example
{ "version": { "id": "20230213175322850781977", "start": "2024-01-01T00:00:00Z", "end": "2024-01-01T00:00:00Z" }, "results": [ { "playerId": "5drhidte8XgD4658j2eHtSljIAzA", "playerName": "Jane Doe", "score": 120.3, "rank": 42, "tier": "gold" } ]}
Get Player Score
Get score and rank for the specified player in the specified leaderboard.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.get)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.get
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/scores/players/{playerId}"
Response example
{ "updatedTime": "2024-01-01T00:00:00Z", "bucketId": "aa74a353-8919-47e4-8645-6e5517055472", "playerId": "5drhidte8XgD4658j2eHtSljIAzA", "playerName": "Jane Doe", "score": 120.3, "rank": 42, "tier": "gold"}
Delete Player Score
Deletes the score for a specific player from a specific leaderboard
Authorizations
ServiceAccount (live_ops.leaderboards.scores.delete)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.delete
Code samples for "{title}":
Request example
curl -X DELETE \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/scores/players/{playerId}"
Response example
{ "type": "problems/basic", "title": "Unauthorized", "status": 401, "code": 1005, "detail": "Unauthorized"}
Delete Player Score From All Live Leaderboards
Deletes the score for a specific player from all live leaderboards
Authorizations
ServiceAccount (live_ops.leaderboards.scores.delete)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.delete
Path parameters for "{title}"
The project's Project ID
Code samples for "{title}":
Request example
curl -X DELETE \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/scores/players/{playerId}/purge"
Response example
{ "type": "string", "title": "Bad Request", "status": 400, "code": 1002, "detail": "Failed to parse request body. Error: Unexpected end of JSON input", "instance": "string"}
Get Version Scores
Get list of scores and ranks for the specified archived leaderboard version, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}/scores"
Response example
{ "version": { "id": "20230213175322850781977", "start": "2024-01-01T00:00:00Z", "end": "2024-01-01T00:00:00Z" }}
Get Version Scores By Tier
Get list of scores and ranks for the specified archived leaderboard version, within the specified tier, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}/tiers/{tierId}/scores"
Response example
{ "tier": "gold"}
Get Version Bucket IDs
Get the bucket IDs for a specific bucketed leaderboard archive version, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}/buckets"
Response example
{ "offset": 0, "limit": 10, "total": 1, "version": { "id": "20230213175322850781977", "start": "2024-01-01T00:00:00Z", "end": "2024-01-01T00:00:00Z" }, "results": [ "8bdacc33-6eef-4577-beb0-633c86259f5b" ]}
Get Version Bucket Scores
Get list of scores and ranks for the specified bucket from the specified leaderboard version, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}/buckets/{bucketId}/scores"
Response example
{ "version": { "id": "20230213175322850781977", "start": "2024-01-01T00:00:00Z", "end": "2024-01-01T00:00:00Z" }}
Get Version Bucket Scores By Tier
Get list of scores and ranks for the specified bucket from the specified leaderboard version, within the specified tier, with specified pagination.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.list)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.list
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}/buckets/{bucketId}/tiers/{tierId}/scores"
Response example
{ "tier": "gold"}
Get Version Player Score
Get score and rank for the specified player in the specified archived leaderboard version.
Authorizations
ServiceAccount (live_ops.leaderboards.scores.get)
HTTP: ServiceAccount
To get started with authentication, visit the Service Account Authentication section.
HTTP Authorization Scheme: basic
Required scopes: live_ops.leaderboards.scores.get
Code samples for "{title}":
Request example
curl -X GET \ -H "Authorization: Basic <YOUR_CREDENTIALS>" \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}/scores/players/{playerId}"
Response example
{ "version": { "id": "20230213175322850781977", "start": "2024-01-01T00:00:00Z", "end": "2024-01-01T00:00:00Z" }, "playerId": "5drhidte8XgD4658j2eHtSljIAzA", "playerName": "Jane Doe", "score": 120.3, "rank": 42, "tier": "gold"}
Delete Leaderboard Version
Delete the specified leaderboard version.
Code samples for "{title}":
Request example
curl -X DELETE \ "https://services.api.unity.com/leaderboards/v1/projects/{projectId}/environments/{environmentId}/leaderboards/{leaderboardId}/versions/{versionId}"
Response example
{ "type": "string", "title": "Bad Request", "status": 400, "code": 1002, "detail": "Failed to parse request body. Error: Unexpected end of JSON input", "instance": "string"}