CEEJAYDocs

Delete a player

Delete what CEEJAY stores for one player ID in one game, for example when a player asks for their data to be erased.

POST /v1/games/{game}/players/{playerId}/delete · requires players:delete

Call it when a player asks your studio to delete their data, to forward the request to CEEJAY. It removes the connection of the player and the values, events and logs CEEJAY stores for that player ID in this game. It does not delete the Discord member or anything the member did in the community that is not about the game.

Path parameters

Prop

Type

The request takes no body. A body that is sent must be a JSON object.

Returns

Prop

Type

removed holds:

Prop

Type

Example

Request
curl -X POST https://ceejay.communitystudios.xyz/api/v1/games/rugby_manager/players/p_19/delete \
  -H "Authorization: Bearer $CEEJAY_API_KEY"

The TypeScript tab calls ceejay.players.delete from the TypeScript SDK. It returns the data of the response below.

200 OK
{
  "success": true,
  "data": {
    "deleted": true,
    "removed": {
      "connection": 1,
      "values": 6,
      "events": 12,
      "pending": 0,
      "purchases": 2
    }
  }
}

What is deleted, and what stays

First the player's active connection is ended, as Disconnect a player ends it, and CEEJAY's bot is given up to 5 seconds to remove the connected role and send player.disconnected. Then, in one step, these are removed:

  • every connection of this player in this game, the ended ones too, with its refresh tokens and consent details;
  • the member's values for this game's fields, current and older;
  • the player's game events in the member history, and the entries that say the player connected or disconnected, so no ID of the player is left there;
  • the connection log for this game and member, and the player ID in the "previous player" of a connection that was moved;
  • the player's connect sessions and connect passes, whatever their age, and work still queued for the player;
  • everything held for the player if they had not connected: their values and events.
  • the player ID, the proof and the connection a purchase made through the game's shop carries, so a delivery that is sent again names no player. The purchase and the coins it cost are the member's and stay.

These stay:

  • Rewards already granted. They store a hash of the player, never the ID, so "once per player" still holds.
  • A restriction set by the community. Only the community's team can lift it.
  • An erasure marker, a hash and nothing else. It prevents data your game sends later for this ID from being held again.

The request log of this call contains the route, not the ID.

Safe to repeat

When nothing is found the response is still 200 with zeros in removed. The request takes no idempotencyKey. This call is available for paused games and games made for children too.

The scope

players:delete lets a server remove what CEEJAY stores for a player. It is never part of *: a Full Access key returns 403 here. Tick Delete a player's data when you make the key. It is a POST of its own, and not a DELETE on the player, because the scope it needs belongs to the whole route.

Limits

This request is counted against the key's own requests per minute: 60 unless a higher limit was set on it, and never more than 600. Rate limits has the numbers and the headers.

Errors

StatuscodeerrorWhen
400bad_requestThe request body must be a JSON objectThe body is null, text, a number or a list
400bad_player_idplayerId must be 1 to 128 characters: letters, digits and . _ : @ | + = -, starting with a letter or a digitThe player ID in the URL path is longer than 128 characters, or contains a character that is not allowed (letters, digits and . _ : @ | + = -, starting with a letter or a digit)
403community_not_activeThis community is no longer active on CEEJAYThe community removed CEEJAY from its server
403game_not_allowedThis API key is limited to other gamesThe key is limited to other games of the community
404not_availableThis is not available on this instance yet.Connect is not enabled for this instance. It is enabled per instance. The body adds feature, which is players. Retrying will not change the response
404game_not_foundGame not foundThe community has no game with this slug, or the game was removed. A slug that is not 2 to 32 lower-case letters, digits and underscores, starting with a letter, gets this response too

Every error body also carries requestId, and a 400 with the code bad_request names the invalid field in field. Match on code, not on the message text, which can change.

The errors every request shares (401, 403 for a missing scope, 405, 429, 500) are on the Errors page.

On this page

Community StudiosPrivacyTerms