# Creator group events

Log and delete creator group events that drive bounty objective progress.

Creator group events are in-game events that drive bounty objective progress. You log each event by its assigned event code, and Nexus counts it toward any bounty objective associated with that code.

## Logging an event

A bounty objective can progress from events in your game, triggered either by a player a creator referred or by the creator's own in-game player. An event is something like "reach level 20" or "play for 5 hours". Nexus assigns each event a code, and you log one instance of that event by posting its code.

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

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

The status should be `200 OK` with a JSON response body that looks something like this:

```json
{
  "eventId": "yUFNyGTjrqJXokP13SFP_",
  "referralCode": "popcornfrog",
  "playerId": "userUniqueIdentifier1"
}
```

This response means the player `userUniqueIdentifier1` triggered `greatGameLevel20`, which is reaching level 20 in Great Game. Nexus counts it toward every bounty objective associated with that event code.

`referralCode` is optional. If you include it, Nexus knows a referred player triggered the event and counts it toward the referring creator's [Referral Event Objectives](/additional-features/bounties/overview/#referral-event-objectives).

Nexus also checks `playerId` against the Creator Group's referral members. If it matches, the creator triggered the event themselves, and Nexus counts it toward that creator's [Creator Event Objectives](/additional-features/bounties/overview/#creator-event-objectives).

You can log events that no bounty uses, and events for players who have no referral or are not part of your referral program.

* When a new bounty is created, it will be possible to count past events as progress for existing members.
* The [Add a referral code](/additional-features/bounties/creator-group-events/add-referral-code/) API associates a player's past events with a referral code added later, for a player who had no referral code when you logged them.

## Delete event

<ApiMethod method="DELETE" path="/event/{eventId}" />
<LinkCard title="View full reference" description="Parameters, responses, and status codes." href="/api/bounties/operations/eventdelete/" />

```bash
curl -X 'DELETE' \
  'https://api.nexus.gg/v1/bounties/event/2ixlNNFdJh-9scoXek80w' \
  -H 'accept: application/json' \
  -H 'X-SHARED-SECRET: nexus_sk_your_key_here'
```

The response is `200 OK` with no body, or `404 Not Found` if the event does not exist.

<Aside type="caution">
If the event being deleted was counted toward progress of a Bounty Objective, the progress will only be removed if the Bounty has not yet been completed.
</Aside>
