API ReferenceSessions
Update Session Status
Transition a session to in_progress, completed, or cancelled.
PATCH /api/sessions/{sessionId}/statusTransitions a session to a new status. The endpoint enforces valid state transitions and automatically records timestamps.
Valid Transitions
| From | To | Side Effects |
|---|---|---|
scheduled | in_progress | Sets actualStartAt to now. |
scheduled | cancelled | Sets cancelledAt to now. Records cancellationReason if provided. |
in_progress | completed | Sets actualEndAt to now. Records summary if provided. |
in_progress | cancelled | Sets 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
| Status | Meaning |
|---|---|
400 | Invalid transition, unknown actor, or bad body. |
401 | Missing API key. |
403 | Invalid API key. |
404 | Session not found. |
500 | Internal server error. |
Was this page helpful?