Sessions
sessions.close
Closes all of one player’s sessions.
Who calls it
You → us
POST /v1/sessions.closeUse 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
| Field | Type | What it is |
|---|---|---|
requestId | string | Your id for this change. Send it again after a timeout and you get the first answer back. |
firstSentAt | string, UTC time | When you first sent this request. It stays the same on every retry. A request older than 7 days is refused. |
playerId | string | Whose sessions. |
reason | string | Why 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
| Code | When | Your next step |
|---|---|---|
invalid_request | A 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_expired | firstSentAt 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_mismatch | A 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
Request
{
"requestId": "rq-77191",
"firstSentAt": "2026-10-31T09:41:00Z",
"playerId": "p-82731",
"reason": "self_exclusion"
}
Answer
{ "ok": true, … }