HTTP API

Leaderboard Manifest

GET/api/v1/leaderboards
GET
/api/v1/leaderboards

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

search?string

Search term for name matching

active?boolean

Filter by active status

tag?string

Filter by tag key

page?integer

Page number (1-based)

Formatint32
Range0 <= value
limit?integer

Items per page (max 100)

Formatint32
Range0 <= value
sort?string

Sort field and direction (e.g., '-created_at', 'name')

Response Body

application/json

curl -X GET "https://example.com/api/v1/leaderboards"
{  "leaderboards": [    {      "active": true,      "created_at": "2019-08-24T14:15:22Z",      "description": "string",      "entry_count": 0,      "id": "string",      "max_entries": 0,      "name": "string",      "owner_id": "string",      "tags": {        "property1": "string",        "property2": "string"      },      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "pagination": {    "has_more": true,    "page": 0,    "page_size": 0,    "total": 0  }}
POST/api/v1/leaderboards
POST
/api/v1/leaderboards

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to create a new leaderboard

Response Body

application/json

curl -X POST "https://example.com/api/v1/leaderboards" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "created_at": "2019-08-24T14:15:22Z",  "id": "string",  "name": "string"}
GET/api/v1/leaderboards/{id}
GET
/api/v1/leaderboards/{id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Leaderboard ID

Response Body

application/json

curl -X GET "https://example.com/api/v1/leaderboards/string"
{  "active": true,  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "entry_count": 0,  "id": "string",  "max_entries": 0,  "name": "string",  "owner_id": "string",  "tags": {    "property1": "string",    "property2": "string"  },  "updated_at": "2019-08-24T14:15:22Z"}
DELETE/api/v1/leaderboards/{id}
DELETE
/api/v1/leaderboards/{id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Leaderboard ID to delete

Response Body

application/json

curl -X DELETE "https://example.com/api/v1/leaderboards/string"
{  "message": "string",  "ok": true}
PUT/api/v1/leaderboards/{id}
PUT
/api/v1/leaderboards/{id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Leaderboard ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request to update an existing leaderboard

Response Body

application/json

curl -X PUT "https://example.com/api/v1/leaderboards/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "active": true,  "created_at": "2019-08-24T14:15:22Z",  "description": "string",  "entry_count": 0,  "id": "string",  "max_entries": 0,  "name": "string",  "owner_id": "string",  "tags": {    "property1": "string",    "property2": "string"  },  "updated_at": "2019-08-24T14:15:22Z"}

On this page