> ## Documentation Index
> Fetch the complete documentation index at: https://help.lobyco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Game attempt events

> JSON Schemas for the three events Lobyco publishes as a customer's game attempt is assigned, started and finished.

Lobyco publishes a game attempt event as a customer plays a game. An attempt is one play of a game by one customer. Every payload carries `CustomerId`, `GameId` and `AttemptId`.

<Warning>
  Game Attempt Assigned is published only for triggered games. For any other game, a customer's first event is Game Attempt Started.

  Game Attempt Started carries the assigned `AttemptId` only the first time the customer starts that attempt. If the customer leaves it unfinished and starts the game again on a later day, that Game Attempt Started carries a new `AttemptId`.
</Warning>

## Field reference

| Event | Triggering endpoint |
| - | - |
| Game Attempt Assigned | Platform action when a campaign assigns the customer an attempt |
| Game Attempt Started | `POST /v1/games/{gameId}/start` — Start game |
| Game Attempt Finished | Platform action when the hosted game reports the customer's result |

The mobile app equivalent (`POST /mobile-app/v1/games/{gameId}/start`) emits the same Game Attempt Started event. Starting the game again on the same day, before the customer finishes it, returns the open attempt and publishes nothing.

Read the outcome from Game Attempt Finished. `IsWin` on Game Attempt Started is the result Lobyco draws when the attempt starts. It turns to `false` at the finish if the win has expired (`WinValidUntil`) or the game reports a loss.

## Schemas

<Tabs>
  <Tab title="Game Attempt Assigned">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "GameId": { "type": "integer" },
        "AttemptId": { "type": "string", "format": "uuid" },
        "IssuedAt": { "type": "string", "format": "date-time" },
        "ExecutionId": { "type": ["string", "null"] },
        "CustomerId": { "type": "string" },
        "HouseholdId": { "type": ["string", "null"] },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Game Attempt Started">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "GameId": { "type": "integer" },
        "AttemptId": { "type": "string", "format": "uuid" },
        "Created": { "type": "string", "format": "date-time" },
        "RewardId": { "type": ["string", "null"] },
        "IsWin": { "type": "boolean" },
        "FirstAttempt": { "type": "boolean" },
        "WinValidUntil": { "type": ["string", "null"], "format": "date-time" },
        "CustomerId": { "type": "string" },
        "HouseholdId": { "type": ["string", "null"] },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>

  <Tab title="Game Attempt Finished">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "type": "object",
      "properties": {
        "GameId": { "type": "integer" },
        "AttemptId": { "type": "string", "format": "uuid" },
        "Created": { "type": "string", "format": "date-time" },
        "IsWin": { "type": "boolean" },
        "RewardId": { "type": ["string", "null"] },
        "CustomerId": { "type": "string" },
        "HouseholdId": { "type": ["string", "null"] },
        "EventId": { "type": "string" }
      }
    }
    ```
  </Tab>
</Tabs>

## API reference

Endpoint documentation: [Games](/api-reference/promotion-platform/games).

## Related

* [Game events](/integration/external-integrations/events/game-events) — the definition the attempt belongs to.
* [Games integration](/integration/other-integrations/games-integration) — how the app starts a game and receives the result.
* [OutboundAPI connection](/integration/external-integrations/outboundapi-connection) — how these events reach an endpoint in your system.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.