Skip to main content

Envelope

Every body has the same outer shape. data is the only part that differs between events.
Payloads are deliberately thin. An event says what happened and to which poll or participant, by id; it does not describe them. Fetch the API for the current state when you need it, and treat the event as the signal to do so.

Headers

Events

Event names are <resource>.<transition>, or <resource>.<part>.<transition> for a change to part of a resource. New events may be added without a version change; ignore types you do not recognise rather than failing on them. Every poll event carries data.poll, a reference to the poll:
Fetch GET /polls/{pollId} for the title, options, settings and current status. Events about a response add data.participant, a reference to the participant; fetch GET /polls/{pollId}/participants/{participantId} for their name, email and availability. One event per transition. A poll that is closed, reopened and closed again produces three events, each describing the transition it records.

Payloads

A poll was created, from the app or the API.
The poll’s details, options or settings changed. The event says that something changed, not what; fetch the poll for its current state.
The poll stopped accepting responses. reason is manual when the organizer closed it and auto when it closed because every option had passed.
A closed poll accepts responses again.
The organizer picked a time. The poll stops accepting responses, and event is the span that was chosen: start inclusive, end exclusive, both UTC instants. allDay: true means a whole calendar day, given as midnight to midnight UTC.
The poll was deleted. GET /polls/{pollId} returns 404 from now on, so anything you need about it must already be stored.
Someone responded to the poll.
A participant changed their response or their name.
A response was removed, by the participant or the organizer. Fetching the participant returns 404.