## Suggestions, decisions, ratings and tokens per feature (desk:admin, KI-014)

`GET /api/desk/v1/ai/stats`

Module: Desk · operationId: `getAiStats` · Tag: AI · Auth: access token (`Authorization: Bearer <accessToken>`)

### Responses

- **200** Stats (`application/json`)

Fields of the 200 answer:

- `items` (array of object, required)
  - `acceptRate` (number, nullable)
  - `avgConfidence` (number, nullable)
  - `byStatus` (object)
  - `feature` (string)
  - `negativeRating` (integer)
  - `positiveRating` (integer)
  - `tokens` (integer)
  - `total` (integer)

Example 200 answer:

```json
{
  "items": [
    {
      "acceptRate": 0.89,
      "avgConfidence": 0.84,
      "byStatus": {
        "accepted": 71,
        "auto_applied": 30,
        "pending": 18,
        "rejected": 9
      },
      "feature": "triage",
      "negativeRating": 3,
      "positiveRating": 22,
      "tokens": 241300,
      "total": 128
    },
    {
      "acceptRate": 0.97,
      "avgConfidence": 0.81,
      "byStatus": {
        "auto_applied": 58,
        "pending": 4,
        "undone": 2
      },
      "feature": "summary",
      "negativeRating": 1,
      "positiveRating": 6,
      "tokens": 98400,
      "total": 64
    }
  ]
}
```

### Example request

```bash
curl -X GET 'https://api.mbcom.cloud/api/desk/v1/ai/stats' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```
