Menu

Sessions

sessions.close

Closes all of one player’s sessions.

Who calls it

You → usPOST /v1/sessions.close

Use it for example when a player excludes themselves. You may not hold every sessionId, and an answer can be lost in a timeout. Sign the call with your API key. See Authentication.

Request

FieldTypeWhat it is
requestIdstringYour id for this change. Send it again after a timeout and you get the first answer back.
firstSentAtstring, UTC timeWhen you first sent this request. It stays the same on every retry. A request older than 7 days is refused.
playerIdstringWhose sessions.
reasonstringWhy they close.

Answer

ok. Every open session of that player in that environment closes. A session.start for that player that crosses this call is closed too. Open rounds still finish and pay.

Errors

CodeWhenYour next step
invalid_requestA field is missing or wrong, for example a firstSentAt more than 5 minutes in the future. message names the field.Fix the call. Sending it again unchanged fails again.
request_expiredfirstSentAt is older than 7 days. Nothing is done.A bug or a stuck job on your side. Look up the result with session.get or round.get.
duplicate_mismatchA requestId we have seen comes with a different body.A bug on your side: each new change needs a new id.

Every call can also return the codes that guard all calls. See Error codes. This call never counts against your rate limits, so a player can always be closed.

Example

POST /v1/sessions.closeExample
Request
{
  "requestId": "rq-77191",
  "firstSentAt": "2026-10-31T09:41:00Z",
  "playerId": "p-82731",
  "reason": "self_exclusion"
}

Answer
{ "ok": true, … }