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:
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
poll.created
poll.created
A poll was created, from the app or the API.
poll.updated
poll.updated
The poll’s details, options or settings changed. The event says that something changed, not what; fetch the poll for its current state.
poll.closed
poll.closed
The poll stopped accepting responses.
reason is manual when the organizer closed it and auto when it closed because every option had passed.poll.reopened
poll.reopened
A closed poll accepts responses again.
poll.scheduled
poll.scheduled
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.poll.deleted
poll.deleted
The poll was deleted.
GET /polls/{pollId} returns 404 from now on, so anything you need about it must already be stored.poll.participant.created
poll.participant.created
Someone responded to the poll.
poll.participant.updated
poll.participant.updated
A participant changed their response or their name.
poll.participant.deleted
poll.participant.deleted
A response was removed, by the participant or the organizer. Fetching the participant returns
404.