# Add a referral code

Apply a newly added referral code to a player's past events that were logged without one.

You may choose to log events for all of your players, not only ones that have a referral code. If a player later adds a referral code, apply it to all of that player's past events that were logged without one.

<ApiMethod method="POST" path="/event/add-referral-code" />
<LinkCard title="View full reference" description="Parameters, responses, and status codes." href="/api/bounties/operations/addreferralcode/" />

```bash
curl -X 'POST' \
  'https://api.nexus.gg/v1/bounties/event/add-referral-code' \
  -H 'accept: */*' \
  -H 'Content-Type: application/json' \
  -H 'X-SHARED-SECRET: nexus_sk_your_key_here' \
  -d '{
    "playerId": "userUniqueIdentifier1",
    "referralCode": "popcornfrog"
  }'
```

The response is `200 OK` with no body.
