API reference
Events
/events
Posting an event is what makes Raven send. Types come from the Political party pack and from your instance; GET /event-types is the truth for your instance.
GET/event-typesList types · pack plus instanceGET/event-types/{type_key}Read a type · with payload schemaPOST/eventsRecord and judgeGET/eventsList · ?q ?subject_id ?subject_ref ?type_key ?voidedshown →GET/events/{event_id}ReadPOST/events/{event_id}/voidVoid · calls off sends not yet gone
GETList events
Requires events:read. Returns a bare JSON array, newest first.
Query parameters
limitinteger · default 50 · max 200
offsetinteger · default 0
qstring · optional · max 100
Matches the type, the membership's name, or anything in the payload. It goes alongside subject_id or subject_ref: the search reads the events those already chose.
type_keystring · optional
subject_iduuid · optional
subject_refstring · optional · max 200
The same membership, named by your reference, so events written by reference read back by reference. Not with subject_id: both together are a 400. A reference nothing here holds is an empty array, not a 404 — nothing recorded for it is a real answer.
group_iduuid · optional
voidedboolean · optional
true for events taken back, false for the rest.
Returns
200 with an array of events.
Response body
A bare JSON array. Each item is one event: the same fields in every pack. Press Response on the sample to see one whole.
FieldTypeDescription
iduuid
tenant_iduuidThe instance.
type_keystring
subject_iduuid | nullSet when the type's scope is subject — Raven's id, whether the call named the membership by subject_id or by subject_ref.
group_iduuid | nullSet when the type's scope is group.
occurred_atdatetimeAs sent, or when it was recorded.
effective_datedate | nullThe value of the type's date_field: what a rule in days counts from.
effective_atdatetime | nullThe same, where the date field is a date and time: what a rule in minutes counts from.
payloadobjectAs checked against the type's payload_schema.Varies by pack
dedupe_keystringMade from the type's dedupe_fields. The same key is the same event.
sourceapi | upload | manualapi for anything recorded with a key.
upload_iduuid | null
created_byuuid | nullThe key's id, for an event recorded through the API.
created_by_namestring | null“API key · ” and the key's name.
voided_atdatetime | nullSet once the event has been taken back.
voided_byuuid | null
void_reasonstring | null
voided_by_event_iduuid | nullSet when another event cleared this one, rather than a person or a key voiding it.
created_atdatetime
updated_atdatetime
On failure the body is { error, code } instead.