UtilitayDevelopers
Ravenraven
Get an API key
Concepts

Events, rules and messages

Raven does not have a “send message” endpoint. You record that something happened; rules set in the instance decide who hears about it and on which channel. Posting an event is what makes Raven send.

1
POST /events
type_key + payload
2
Validate
against the type’s schema and scope
3
Dedupe
Idempotency-Key, event_ref, dedupe_fields
4
Judge
rules fire; sends queued
5
Messages
GET /messages, read only

Scope

Every event type has a scope. It decides which id the event must carry. A subject-scoped event names the membership either by subject_id, Raven’s id, or by subject_ref, the reference your own system gave it — exactly one of the two, and the event that comes back carries subject_id either way.

Scopesubject_idgroup_id
subjectRequired, or subject_refForbidden
groupForbiddenRequired
tenantForbiddenForbidden

date_field and dedupe

Each type names the payload field that carries its date, so Raven can schedule reminders relative to it. Each type also lists dedupe_fields: two events of the same type, on the same membership, with the same values in those fields are one event. In the Political party pack, dues_due dedupes on period.

Void

POST /events/{event_id}/void takes an event back and calls off the sends that have not gone. One already with the provider finishes; messages that went stay on record, and the event shows as voided. Nothing is deleted.