Skip to content

POST /players

Send a player when they register through an affiliate link.

Call this once, from your server, right after a player who arrived with an aff code creates an account. Affinix links the player to the affiliate and sends the affiliate’s registration postback.

POST/api/v1/players

Request

FieldTypeDescription
playersrequiredobjectThe player. One player per call.
players.affrequiredstringThe aff code saved when the player landed, unchanged. 16 to 2,048 characters.
players.user_idrequiredinteger | stringYour casino’s player ID. Integer, or up to 64 letters, digits, _ and -. Use the same value in activity.
players.countrystringTwo-letter ISO country code, such as DE.
players.created_atstringRegistration time in UTC, as 2026-11-29 10:14:00 or ISO 8601. Defaults to the time of the call; times in the future are ignored.
players.emailstringOptional. Affinix stores a hash for matching; the plain address is kept only if your company enables it in settings.
players.first_name, last_namestringOptional, up to 120 characters each.
Example
curl -X POST https://go.yourbrand.com/api/v1/players \
  -H "affinix-api-key: $AFFINIX_KEY" \
  -H "content-type: application/json" \
  -d '{
    "players": {
      "aff": "SEdBN0x2...%3D",
      "user_id": 88412,
      "country": "DE",
      "created_at": "2026-11-29 10:14:00"
    }
  }'

Responses

FieldTypeDescription
202{"status":"ok","player":"created"}The player was linked to the affiliate.
202{"status":"ok","player":"existing"}This user_id was already known for the brand. Nothing changed.
202{"status":"ok","duplicate":true}An identical payload was already received. Nothing changed.
400{"error":"Invalid payload","issues":[...]}A field is missing or malformed. issues lists up to 10 problems.
400{"error":"unreadable aff token"}The aff value was changed, cut short or belongs to another brand.
400{"error":"unknown affiliate"}The code is valid but the affiliate no longer exists in Affinix.
401{"error":"Unauthorized"}Missing or wrong API key.
Players are unique per brand and user_id. Sending the same player twice is harmless, and the first affiliate stays attached.

Stuck? Email hello@affinix360.com with your brand name and the time of the call.