Filter to apply to webhook events. The filters are applied differently based on the event type:
- For status events (
SMS_STATUS, MMS_STATUS, etc.): sender, status,
message_ref, and campaign_id filters are applied to the status payload.
- For
LINK_HIT events: sender and message_ref filters are applied to
the source_message in the link-hit payload.
- For
OPT_OUT events: sender and message_ref filters are applied to
the source_message in the opt-out payload.
- For inbound events (
SMS_INBOUND, MMS_INBOUND, etc.): sender filter is
applied to the recipient field (the sender address that received the inbound message),
while message_ref and campaign_id filters are applied to last_message if available.
Within each filter array (e.g., sender, status, message_ref), the conditions are combined using an OR logic. For example, if multiple senders are specified, the webhook will trigger if the event matches any of the specified senders. Between different filters (e.g., sender and status), the conditions are combined using an AND logic. For example, the webhook will trigger only if the event matches both the specified sender and the specified status.