{"schema_version":"2.0","record_type":"article","canonical_url":"https://marketingwiki.ai/articles/email-event-webhook-direction-contract","id":"email-event-webhook-direction-contract","slug":"email-event-webhook-direction-contract","title":"Separate Inbound Email Events From Outbound Webhooks","description":"Assign source, direction, consent effects, supported types, retries, retention, and owner before connecting customer events to email automation.","dek":"An event your backend reports and a webhook your email platform emits are opposite pipes, even when both use JSON and the word event.","category":"Email Infrastructure","topics":["Migma","events","webhooks","email automation"],"author":"Marketing Wiki Research Automation","reviewer":null,"publishedAt":"2026-09-06","updatedAt":"2026-09-14","lastVerifiedAt":"2026-09-14","readingMinutes":4,"featured":false,"sources":[{"title":"Migma: Track Customer Events","url":"https://docs.migma.ai/events?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-event-webhook-direction-contract"},{"title":"Migma: Events and Webhooks","url":"https://docs.migma.ai/webhooks?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-event-webhook-direction-contract"},{"title":"Migma: API Reference","url":"https://docs.migma.ai/api-reference/introduction?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-event-webhook-direction-contract"},{"title":"Migma: Integrations Overview","url":"https://docs.migma.ai/integrations/overview?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-event-webhook-direction-contract"}],"wordCount":641,"body":"Draw inbound customer events and outbound email-platform webhooks as separate pipes before writing automation. For every message type, name the producer, consumer, direction, identity key, consent effect, retry owner, and unsupported-state fallback.\n\n> **Editorial disclosure:** Prepared by Marketing Wiki Research Automation under standing direct-publication authorization and not independently reviewed. Sources were refreshed on September 6, 2026.\n\nMigma's [events guide](https://docs.migma.ai/events?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-event-webhook-direction-contract) explicitly calls customer events inbound: a backend reports purchases, trials, upgrades, cancellations, or refunds to Migma. Its [webhook guide](https://docs.migma.ai/webhooks?utm_source=marketingwiki&utm_medium=referral&utm_campaign=email-event-webhook-direction-contract) calls webhooks outbound: Migma notifies an endpoint about platform activity.\n\nBoth use structured payloads. Their arrows point in opposite directions.\n\n## Keep a direction ledger\n\n| Business fact | Producer | Consumer | Interface | Direction | Consent effect |\n| --- | --- | --- | --- | --- | --- |\n| Trial started | Product backend | Email platform | Customer event API | Inbound | None |\n| Purchase completed | Commerce backend | Email analytics | Customer event API | Inbound | None |\n| Email generation completed | Email platform | Workflow service | Webhook | Outbound | None |\n| Contact unsubscribed | Preference or email platform | CRM and suppression store | Webhook or contact API | Outbound plus convergence write | Most restrictive state wins |\n| Link clicked | Delivery analytics | Warehouse or CRM | Product-specific analytics/export | Verify; not assume current webhook support | None |\n| Complaint | Mailbox/provider pipeline | Global suppression owner | Provider-specific event path | Verify; fail closed if unavailable | Suppress |\n\nThe interface cell must name the actual endpoint or product surface. “Webhook” is not enough when the published event catalog excludes the needed state.\n\n## Respect the consent boundary\n\nMigma documents that an inbound event never opts a contact in, resubscribes an unsubscribed contact, or makes a non-sendable contact sendable. Event profile fields can update name, country, language, or custom data while consent remains intact. Keep that separation in your own schema: a `trial.started` event may change lifecycle context, but it must not double as permission to send marketing email.\n\nRoute subscription changes through the documented contact or preference path and reconcile them with the [unsubscribe webhook runbook](/articles/unsubscribe-webhook-reconciliation-runbook).\n\n## Mark unsupported events explicitly\n\nThe current Migma webhook guide lists generation, test-send, import, and subscriber events, then states that opens, clicks, bounces, and complaints are not delivered through that webhook system. Use a routing table:\n\n```yaml\nevent: \"email.clicked\"\nrequired_by: \"crm engagement timeline\"\nwebhook_supported: false\nalternate_surface: \"campaign analytics export\"\nlatency_expectation: \"documented per export job\"\nidentity_keys: [\"message_id\", \"subscriber_id\"]\nowner: \"data engineering\"\nfailure_policy: \"do not claim real-time writeback\"\n```\n\nUnknown is different from unsupported. Preserve both states.\n\n## Test the boundary\n\nUse synthetic records and non-production endpoints.\n\n1. Post one customer event and verify it appears as inbound customer activity without changing subscription status.\n2. Trigger one documented outbound webhook and verify signature, envelope, project routing, and event ID.\n3. Retry both paths and confirm the existing replay contract prevents duplicate business effects.\n4. Attempt to subscribe to an unlisted engagement event and record the response.\n5. Disable the webhook endpoint and confirm failure visibility and recovery ownership.\n6. Change a profile language in an event and verify the contact update without consent mutation.\n\nThe implementation details belong in the [retry and idempotency contract](/articles/email-api-retry-idempotency-contract); this test proves that each message reached the intended pipe first.\n\n## Stop conditions\n\nStop when one payload is used as both business event and consent command, unsupported engagement events are silently assumed, project identifiers are missing, event-time and receipt-time are conflated, webhook signatures are not checked, or nobody owns recovery after a failed outbound delivery.\n\n## Evidence limits\n\nMarketing Wiki did not call Migma's API or observe delivery. Documentation establishes the current direction and listed event coverage, not completeness across every integration or analytics surface. Recheck the published event catalog before implementation."}