> ## Documentation Index
> Fetch the complete documentation index at: https://docs.4cx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List events

> Returns the distinct event names for a sport, to narrow the schedule.

Returns the distinct `eventName` values for a sport's upcoming games, so you can offer an event filter. This returns **event name strings only** — to get game `id` values for the orderbook, use [Get active game IDs](/pages/markets/get-active-game-ids).

Only games starting within the next **30 days** (from now) are considered. The list is the deduplicated set of those games' event names; when at least one is found, the sentinel `"all"` is prepended so you can offer an "all events" choice.

## Request

<Card>
  **POST** `https://api.4cx.io/exchange/getEvents` <Badge color="green">POST</Badge>
</Card>

**Headers:** `Authorization`, `Content-Type: application/json`

`sport` is required.

<CodeGroup>
  ```json Request theme={null}
  {
    "sport": "basketball"
  }
  ```

  ```json Response theme={null}
  {
    "data": {
      "availableEvents": [
        "all",
        "Team A vs Team B",
        "Sample Event Two"
      ]
    }
  }
  ```
</CodeGroup>

**Notes**

* `availableEvents` is empty (`[]`) when there are no upcoming games for the sport in the 30-day window — in that case `"all"` is **not** included.
* `sport: "fighting"` always returns an empty `availableEvents` array; events are not surfaced for that sport.
