Skip to main content

Identify

POST https://api.casinocrm.io/v1/players/identify — tells casinocrm.io that an anonymous_id is a real player with these traits. Call it on signup and whenever a trait (email, phone, …) changes.

Auth: API key (project-scoped) — Authorization: Bearer ucrm_pk_....

Request

{
"anonymous_id": "casino_player_001", // REQUIRED — your stable player id
"traits": { // all optional
"email": "player@example.com",
"phone": "+420771234567", // E.164
"telegram_id": "12345",
"wallet": { "network": "btc", "address": "bc1q..." }
}
}
Identity = anonymous_id

anonymous_id is required — a stable id you control. Server-side platforms send their own permanent player id here. There is no top-level external_id field on identify; use anonymous_id as the join key (the same value you put on every event).

Accepted traits

Only these keys are allowed inside traits (others return 422 unrecognized_keys):

TraitNotes
emailcase-insensitive match
phoneE.164 (+420...)
telegram_idstring
wallet{ "network": "btc|eth|...", "address": "..." } — address validated per network

Resolution algorithm

  1. Validateanonymous_id required; traits optional.
  2. Find candidates by priority: emailphonetelegram_idwallet (network,address).
  3. Resolve:
    • No candidate → INSERT a new player keyed by anonymous_id (action: created).
    • One candidate → MERGE traits, attach the anonymous_id (action: updated).
    • Conflicting candidates → keep the oldest, mark others status='conflict' for admin review.

Response

{
"data": {
"player_id": "uuid", // store this if you want to send events by player_id
"action": "created" | "updated"
}
}

Errors

CodeMeaning
200resolved
401bad/missing API key
422 anonymous_id Requiredmissing anonymous_id
422 unrecognized_keysa trait key is not in the accepted set
422 wallet ...wallet address doesn't match the network format