POST/surveys/events

Track survey widget events

Batched aggregate event tracking for the public Survey widget. The server stores only `(project, survey, day_utc, event_kind)` counters — no IP, user agent, fingerprint, or anonymous visitor ID is persisted. The widget therefore does not need to set tracking cookies or prompt the visitor for consent. Three event kinds are widget-fired (`shown`, `started`, `dismissed`); the others are incremented server-side: `dispatched` from the lifecycle dispatcher, `link_clicked` from the magic-link landing handler, and `submitted` from `POST /surveys/submit`.

Base URLhttps://seggwat.com/api/v1

Parameters

Refererheaderstring (uri-reference)

Optional HTTP Referer header indicating the page URL where the submission originated

Example: https://example.com/dashboard

Request Body

required

Batch of widget events. Cap of 32 events per request — larger batches are rejected with 413.

application/json
SurveyEventsBatch

Batch of survey widget events. Counted server-side as `(project, survey, day_utc, kind)` aggregates — no per-respondent attribution.

eventsarray<SurveyEventInput>required
project_keystring (uuid)required(uuid)

Public project key from the widget script tag.

Responses

Navigation