Create a player
/v1/playersCreates a player before they have done anything, which is worth doing at sign-up: send their time zone here and their first day already ends at their own midnight rather than the project's.
You do not have to. A player also appears the first time you send an event for them, ask for their missions, or move their points.
Calling this twice is not an error. The second call reports the player as already there and updates their time zone if you sent one, so a retry after a timeout is safe.
Authorization
ApiKey Paste a project API key (no 'Bearer ' prefix). Create one in the dashboard under API keys.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for creating a player. The project environment is not part of the body: it is resolved from the API key.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/players" \ -H "Content-Type: application/json" \ -d '{ "playerId": "string" }'{ "playerId": "string", "created": true, "timeZoneId": null}