Skip to main content

Event Types & Filtering

Zyphr supports 25 webhook event types organized into three categories. Events use a dot-notation format: {resource}.{action}.

Event Categories

Email Events (9 types)

Event TypeDescription
email.queuedAn email message has been accepted and queued for sending
email.sentAn email message has been sent to the mail provider
email.deliveredAn email message was successfully delivered to the recipient
email.bouncedAn email message permanently bounced and could not be delivered
email.soft_bouncedAn email message temporarily bounced (transient failure)
email.complainedA recipient marked the email as spam
email.openedA recipient opened the email (tracking pixel loaded)
email.clickedA recipient clicked a tracked link in the email
email.failedAn email message could not be sent due to a processing error

Push Events (4 types)

Event TypeDescription
push.sentA push notification has been sent to the provider
push.deliveredA push notification was delivered to the device
push.failedA push notification could not be delivered
push.expiredA push notification expired before it could be delivered

Auth Events (12 types)

Event TypeDescription
user.createdA new end user has been created in an auth application
user.loginAn end user has logged in
user.logoutAn end user has logged out
user.password_changedAn end user's password has been changed
user.password_reset_requestedAn end user requested a password reset
user.email_verifiedAn end user's email address has been verified
user.phone_verifiedAn end user's phone number has been verified
user.deletedAn end user has been deleted from an auth application
user.session_revokedAn end user's session has been revoked
user.mfa_enabledAn end user has enabled multi-factor authentication
user.mfa_disabledAn end user has disabled multi-factor authentication
user.impersonatedAn admin has started impersonating an end user

Event Envelope Format

All webhook payloads use the canonical WebhookEventEnvelope format (API version 2026-02-01):

{
"id": "evt_550e8400-e29b-41d4-a716-446655440000",
"type": "email.delivered",
"api_version": "2026-02-01",
"created_at": "2026-02-07T12:00:00.000Z",
"data": {
"message_id": "550e8400-e29b-41d4-a716-446655440000",
"recipient_email": "user@example.com",
"timestamp": "2026-02-07T12:00:00.000Z"
}
}
FieldTypeDescription
idstringUnique event ID in evt_{uuid} format
typestringDot-delimited event type
api_versionstringAPI version that produced this payload
created_atstringISO 8601 timestamp with timezone
dataobjectEvent-specific payload data

Email Event Data Fields

FieldTypeDescription
message_idstringZyphr message ID
recipient_emailstring | nullRecipient email address
timestampstringISO 8601 timestamp of the event
bounce_typestring | nullBounce classification — Permanent or Transient (bounce events only)
bounce_subtypestring | nullDetailed bounce sub-type from provider (bounce events only)
complaint_feedback_typestring | nullComplaint feedback type from provider (complaint events only)

Push Event Data Fields

FieldTypeDescription
push_message_idstringZyphr push message ID
providerstring | nullPush provider — fcm, apns, or webpush
timestampstringISO 8601 timestamp of the event
error_codestring | nullProvider-specific error code (failure events only)
error_messagestring | nullHuman-readable error description (failure events only)

Auth Event Data Fields

FieldTypeDescription
application_idstringAuth application ID
userobjectUser object with id and email
metadataobjectAdditional context (provider, IP address, session ID, MFA method, etc.)

Event Filtering

When creating a webhook, specify which events to receive via the events array:

curl -X POST https://api.zyphr.dev/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks",
"events": ["email.delivered", "email.bounced", "user.created"]
}'

At least one event type is required. You can update the subscribed events at any time with a PUT request.

Listing Available Event Types

Use the events endpoint to retrieve all available event types with their full registry information:

curl https://api.zyphr.dev/v1/webhooks/events \
-H "Authorization: Bearer YOUR_API_KEY"

Filter by category with the category query parameter:

curl "https://api.zyphr.dev/v1/webhooks/events?category=email" \
-H "Authorization: Bearer YOUR_API_KEY"

Valid categories: email, push, auth.

The response includes the full event registry with payload field schemas and example payloads for each event type.