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

# Flywheel events handler

> **Required scope:** read

**Required scope:** `read`

### Query parameters

**limit** `integer`

Maximum number of events to return (1..1000)

### Response

`FlywheelEventsResponse`

**events** `LearningEvent[]` *required*

**LearningEvent**

**confidence** `number (float)` *required*

Outcome confidence

**event\_type** `LearningEventType` *required*

**LearningEventType**

**error** `string` *required*

**raw\_query** `string` *required*

**type** `string` *required*

**id** `string` *required*

Unique event ID

**metadata** `object` *required*

Additional metadata

**org\_id** `string`

Organization context

**query** `string` *required*

The query that triggered this event

**strategy** `string` *required*

Strategy used

**success** `boolean` *required*

Whether the outcome was successful

**timestamp** `string (date-time)` *required*

When this event occurred

**total** `integer` *required*

### Status codes

| Code | Meaning |
| - | - |
| `200` | Recent learning events |
| `401` | Unauthorized — missing or invalid credentials |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

```bash cURL theme={null}
curl --request GET \
  --url 'https://api.nsr.stateset.com/api/v1/flywheel/events' \
  --header "X-API-Key: $STATESET_NSR_API_KEY"
```

```json 200 theme={null}
{
  "events": [
    {
      "confidence": 7.5,
      "event_type": {
        "error": null,
        "raw_query": null,
        "type": null
      },
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "metadata": null,
      "org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "query": "string",
      "strategy": "string",
      "success": true,
      "timestamp": "2026-08-31T14:22:05Z"
    }
  ],
  "total": 102
}
```


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