client.webhooks.create()) and interview-flow signals (per-step secret from client.graph.get_signals()). The module makes no API calls. See Receiving webhooks for a full receiver.
payload arguments accept bytes, bytearray or str, and should be the raw request body exactly as received. headers can be any mapping; lookup is case-insensitive.
unwrap()
The maximum age and clock skew of
webhook-timestamp, in seconds. None disables the check, for example when replaying stored deliveries.InterviewCompletedEvent for known organization events, or a plain WebhookEvent for signals and unrecognized types.
Raises WebhookVerificationError if the delivery isn’t authentic or isn’t an event.
verify()
unwrap().
Raises WebhookVerificationError if headers are missing, the timestamp is outside the tolerance, or no signature matches.
parse_event()
WebhookVerificationError if the body isn’t a JSON event envelope.
sign()
payload, for testing your receiver locally.
Returns a dict of headers: webhook-id, webhook-timestamp and webhook-signature.
Constants
Event models
WebhookEvent
The base class for every event, and the type returned for signals and unknown event types.Typed events
All
data fields are optional strings, except completed, which is an optional bool. survey_id is the study ID under its older name. participant_id is Deutero’s own ID for the participant. external_participant_id and web_source come from the participant’s link and aren’t authenticated.
If a known event type arrives with data that no longer fits its model, unwrap still returns it, as a plain WebhookEvent..png?fit=max&auto=format&n=G_hwo_L4hZsQ93vT&q=85&s=c00b6042d4688a9b776bae65a530206a)