RankGun logoRankGun

Update Session Status

Transition a session to in_progress, completed, or cancelled.

PATCH /api/sessions/{sessionId}/status

Transitions a session to a new status. The endpoint enforces valid state transitions and automatically records timestamps.

Valid Transitions

FromToSide Effects
scheduledin_progressSets actualStartAt to now.
scheduledcancelledSets cancelledAt to now. Records cancellationReason if provided.
in_progresscompletedSets actualEndAt to now. Records summary if provided.
in_progresscancelledSets cancelledAt to now. Records cancellationReason if provided.

Any other transition returns 400.

Headers

Prop

Type

Path Parameters

Prop

Type

Request Body

Prop

Type

curl -X PATCH https://api.rankgun.works/api/sessions/k7abc/status \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actorRobloxId": 123456,
    "status": "completed",
    "summary": "Great session, everyone participated"
  }'

Response

200 OK

Response shape matches Get Session{ success, session, participants }.

Errors

StatusMeaning
400Invalid transition, unknown actor, or bad body.
401Missing API key.
403Invalid API key.
404Session not found.
500Internal server error.
Was this page helpful?

On this page