RankGun logoRankGun

List Upcoming Sessions

List the next N scheduled sessions ordered by start time.

GET /api/sessions/upcoming

Returns the next N scheduled sessions ordered by scheduledStartAt ascending. Only sessions with status scheduled and scheduledStartAt in the future are returned.

Headers

Prop

Type

Query Parameters

Prop

Type

curl "https://api.rankgun.works/api/sessions/upcoming?limit=5" \
  -H "x-api-key: YOUR_API_KEY"

Response

200 OK

{
  "success": true,
  "sessions": [
    {
      "id": "k7...",
      "title": "Saturday Training",
      "sessionTypeId": "j5...",
      "sessionTypeName": "Training",
      "status": "scheduled",
      "scheduledStartAt": 1712345678,
      "scheduledEndAt": 1712349278,
      "actualStartAt": null,
      "actualEndAt": null,
      "createdByRobloxId": 123456,
      "createdByUsername": "Builderman",
      "cancelledAt": null,
      "cancellationReason": null,
      "createdAt": 1712000000,
      "updatedAt": 1712000000
    }
  ]
}

Fields match the session summary shape documented in List Sessions.

Errors

StatusMeaning
400Invalid limit (not a number, out of range).
401Missing API key.
403Invalid API key.
500Internal server error.
Was this page helpful?

On this page