> ## 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 process handler

> **Required scope:** write

**Required scope:** `write`

### Response

`FlywheelProcessResponse`

**new\_candidates** `PromotionCandidate[]` *required*

**PromotionCandidate**

**artifact\_type** `ArtifactType` *required*

**content** `any` *required*

**created\_at** `string (date-time)` *required*

**evidence\_events** `string[]` *required*

**id** `string` *required*

**org\_id** `string`

**reviewed\_at** `string (date-time)`

**reviewed\_by** `string`

**status** `PromotionStatus` *required*

**stats** `FlywheelStats` *required*

**FlywheelStats**

**approved\_candidates** `integer` *required*

**auto\_promoted** `integer` *required*

**pending\_candidates** `integer` *required*

**processed\_events** `integer` *required*

**queued\_events** `integer` *required*

**rejected\_candidates** `integer` *required*

**total\_new\_candidates** `integer` *required*

### Status codes

| Code | Meaning |
| - | - |
| `200` | Processed queue and generated promotion candidates |
| `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 POST \
  --url 'https://api.nsr.stateset.com/api/v1/flywheel/process' \
  --header "X-API-Key: $STATESET_NSR_API_KEY"
```

```json 200 theme={null}
{
  "new_candidates": [
    {
      "artifact_type": "Rule",
      "content": null,
      "created_at": "2026-08-31T14:22:05Z",
      "evidence_events": [],
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "reviewed_at": "2026-08-31T14:22:05Z",
      "reviewed_by": "string",
      "status": "Pending"
    }
  ],
  "stats": {
    "approved_candidates": 1,
    "auto_promoted": 1,
    "pending_candidates": 1,
    "processed_events": 1,
    "queued_events": 1,
    "rejected_candidates": 1
  },
  "total_new_candidates": 1
}
```


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