---
title: "Survey Event"
method: POST
path: "/survey/event"
---

# Survey Event

`POST /survey/event`

## Request

- Base URL: `https://api.local-mcp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.local-mcp.com/survey/event`
- Auth: none declared

Stamp a funnel column (shown/opened/skipped/dismissed) — first-write-wins.
`skipped` also increments skip_count.

`gate_declined` is a DIAGNOSTIC event (not a funnel column): the client fires it once per run when
a survey is targeted + cached but the gate still won't show it (reason = already_shown /
skipped_this_session). Log-only so we can see, fleet-wide, WHY a targeted survey stays hidden —
the delivery-debug signal added with the cache-warmup fix. `sessions_lt_min:x/y` was a third
reason until #2758 removed the threshold; clients that predate it can still send it, so the
handler keeps accepting any reason string rather than validating against a list.

## Request body

- SurveyEventBody
  - `machine_id` string, required
  - `survey_id` integer, required
  - `event` string, required
  - `reason` string, nullable
  - `source` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/local-mcp/apis/lmcp-api.md) · [All operations](https://skmtc.dev/local-mcp/apis/lmcp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/local-mcp/apis/lmcp-api/revisions/f1f1c502623a?raw)
