Skip to main content

Novu supports the following webhook event types:

  • Email events: Events when Novu receives inbound mail on a verified domain with a webhook route.
  • Message events: Events about message delivery status changes.
  • Preference event: Event about subscriber preference changes.
  • Workflow events: Events about workflow creation, updates, and deletions.

Each event includes detailed information about the affected resource and the changes that occurred.

Note

Every event payload is published in the OpenAPI specification under x-webhooks. The Event Catalog on the Webhooks page renders those schemas, so it always matches what Novu sends.

Event envelope#

Every webhook body uses the same envelope. The resource itself is under data.object.

FieldTypeDescription
idstringUnique identifier of the webhook event, prefixed with evt_
typestringEvent type, for example message.sent
objectstringResource type the event relates to: message, workflow, preference, or email_inbound
timestampstringISO timestamp of when the event occurred
environmentIdstringIdentifier of the environment the event belongs to
dataobjectEvent payload. Always contains object, and previousObject on update events

Email events#

  • email.received: Triggered when Novu receives an inbound email that matches an Inbound Email Webhook route on a verified domain. The payload includes normalized mail content (from, to, subject, text, html, headers, attachments, threading fields) plus domain and route metadata. When the matched route address is only in the SMTP envelope (a BCC recipient not present in to or cc), it appears in mail.bcc and to is left unchanged; the field is omitted otherwise. Download files from each attachment’s url before expiresAt. See Attachments.
Note

email.received is for user mail received on your domain. It is not the same as delivery or engagement events from your outbound email provider - see Email Activity Tracking for those.

Inbound email payload#

data.object contains domain, route, and mail.

FieldTypeDescription
domain.idstringIdentifier of the domain that received the email
domain.namestringDomain name, for example mail.yourcompany.com
domain.dataRecord<string, string>Custom data configured on the domain
route.addressstringLocal part of the receiving address, for example support
route.dataRecord<string, string>Custom data configured on the route, for example a tenant identifier
mail.fromArray<{ address, name }>Sender addresses
mail.toArray<{ address, name }>Recipient addresses
mail.ccArray<{ address, name }>Carbon copy addresses, when the sender set any
mail.bccArray<{ address, name }>Matched SMTP envelope recipient when it is absent from to and cc. Omitted otherwise
mail.subjectstringEmail subject
mail.textstringPlain text body
mail.htmlstringHTML body
mail.messageIdstringValue of the Message-ID header
mail.headersRecord<string, string | string[]>Raw mail headers, keyed by lowercase header name
mail.datestring | nullTimestamp taken from the Date header, or null when the header is invalid
mail.inReplyTostringValue of the In-Reply-To header, set on replies
mail.referencesstring | string[]Value of the References header, delivered as a single value or a list depending on the sender
mail.attachmentsarrayAttachments found on the email. Empty array when there are none

Each attachment has the following fields.

FieldTypeDescription
filenamestringFile name of the attachment
contentTypestringMIME type of the attachment
sizenumberFile size in bytes
urlstringPresigned download URL. Absent on self-hosted deployments without S3, where content carries the bytes instead
expiresAtstringISO timestamp when url stops being valid
contentobject | nullDeprecated, use url. Raw bytes as { "type": "Buffer", "data": number[] }, or null when rehydration failed
contentBytesnumberDeprecated, use size

Message events#

  • message.archived: This webhook is triggered when a subscriber archives a message. The payload contains the details of the event.
  • message.deleted: This webhook is triggered when a message is deleted. The payload contains the details of the event.
  • message.delivered: This webhook is triggered when a message delivery provider acknowledged the message delivery to the end receiving client. The payload contains the details of the event.
  • message.failed: This webhook is triggered when Novu tries to send the message to the delivery provider and it got failed. The payload contains the details of the event.
  • message.read: This webhook is triggered when a message has been read by the subscriber. The payload contains the details of the event.
  • message.seen: This webhook is triggered when a subscriber opens a message. The payload contains the details of the event.
  • message.sent: This webhook is triggered when Novu sends the message to the delivery provider. The payload contains the details of the event.
  • message.snoozed: This webhook is triggered when a message is snoozed by the subscriber. The payload contains the details of the event.
  • message.unarchived: This webhook is triggered when an archived message is unarchived. The payload contains the details of the event.
  • message.unread: This webhook is triggered when a message is unread or marked as unread by the subscriber. The payload contains the details of the event.
  • message.unsnoozed: This webhook is triggered when a message is unsnoozed by a subscriber. The payload contains the details of the event.

Email and push activity-tracking events use these same message.* types. The status mapping is in Activity tracking.

Message payload#

All message events share the same data.object shape.

FieldTypeDescription
_idstringIdentifier of the message
_templateIdstringIdentifier of the workflow that produced the message
_environmentIdstringEnvironment identifier
_organizationIdstringOrganization identifier
_notificationIdstringIdentifier of the notification
subscriberIdstringSubscriber identifier supplied by the producer. Direct send and Inbox events use the external subscriber identifier
actorSubscriberobjectActor subscriber, when the message was triggered on behalf of another subscriber
templateIdentifierstringWorkflow identifier used when triggering the workflow
workflowIdstringSame as templateIdentifier. Included for correlation with workflow events
stepIdstringStep identifier, used to correlate with workflow steps
transactionIdstringTrigger transaction identifier
channelstringChannel the message was sent on
providerIdstringProvider identifier that delivered the message
statusstringDelivery status stored on the message: sent, error, or warning
seenbooleanWhether the message has been seen
readbooleanWhether the message has been read
archivedbooleanWhether the message is archived
archivedAtstringArchive timestamp
snoozedUntilstringWhen set, the Inbox message is snoozed until this timestamp
deliveredAtstring[]Delivery timestamps recorded for the message
firstSeenDatestringFirst time the message was seen
lastSeenDatestringLast time the message was seen
lastReadDatestringLast time the message was read
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp
errorIdstringProvider or internal error identifier when delivery failed
errorTextstringProvider or internal error text when delivery failed
contextKeysstring[]Context keys associated with the message
providerResponseIdstringProvider response identifier for the send attempt
deviceTokenstringDevice token used for a push send
channelDataobjectChannel endpoint used for the send. Contains type, identifier, endpoint, and optionally token, subscriberTenantId, and clientId
webhookUrlstringDeprecated, use channelData. Chat webhook URL used for the send

message.sent and message.failed can also include an error object next to object. Chat providers report a send failure on message.sent, so treat error as meaningful on both events.

FieldTypeDescription
error.messagestringError message from the provider or send attempt
error.push.reasonstringWhy a push send failed: token_invalid or generic_error
error.push.deviceTokenstringDevice token that failed
Note

Secrets on channelData such as token are redacted before delivery.

Activity tracking#

Email activity tracking and push activity tracking are delivered as message.* webhooks with the message payload.

Novu also sends message.sent when it hands the message to the provider, and message.failed when that handoff fails. Those events are independent of activity tracking. Email activity tracking sends message.sent again when the normalized status is sent. Resend (email.sent) and Amazon SES (Send) report that status. SendGrid and Mailgun do not.

Note

data.object is the message record loaded when the event arrived. seen, read, deliveredAt, and status still hold the values from before this event. Use type as the activity signal.

Email#

Email activity tracking is available on Novu Cloud and Enterprise self-hosted. Provider events are normalized to the statuses in Event semantics, then mapped:

Novu statusWebhook event
sentmessage.sent
deliveredmessage.delivered
openedmessage.seen
bouncedmessage.failed
rejectedmessage.failed
blockedmessage.failed
droppedmessage.failed
clickedNo webhook
delayedNo webhook
complaintNo webhook
unsubscribedNo webhook

clicked is written to the activity feed and sets read and seen on the message. delayed, complaint, and unsubscribed are written to the activity feed and leave the message unchanged. bounced, rejected, blocked, and dropped send message.failed and leave status on the message unchanged. The activity feed keeps the specific status. Any other normalized status, including spam and deferred, is not sent as a webhook.

Push#

Push events are the eventType values forwarded to the activity track API. Novu matches the event when eventId is the __nvMessageId from the notification. See Push activity tracking.

eventTypeWebhook event
deliveredmessage.delivered
openedmessage.seen
clickedmessage.read
dismissedmessage.read
failedmessage.failed

clicked and dismissed both send message.read.

Preference event#

  • preference.updated: This webhook is triggered when a subscriber preference is updated. The payload contains the details of the event.

Preference payload#

data contains the updated preference under object, plus the subscriberId it belongs to.

FieldTypeDescription
subscriberIdstringIdentifier of the subscriber whose preference changed
object.levelstringWhether this preference is global or template (workflow-specific)
object.enabledbooleanWhether notifications are enabled
object.channelsobjectPer-channel flags: email, sms, in_app, chat, push, and tool
object.subscriptionIdstringTopic subscription identifier, on subscription preferences
object.workflowobjectWorkflow the preference applies to, on workflow-level preferences
object.scheduleobjectDelivery schedule, with isEnabled and an optional weeklySchedule
object.conditionobjectJsonLogic condition controlling whether this preference applies

The nested workflow object has the following fields.

FieldTypeDescription
idstringIdentifier of the workflow
identifierstringWorkflow identifier used when triggering. May be absent for subscription preferences
namestringName of the workflow
criticalbooleanWhether the workflow ignores subscriber preferences
severitystringWorkflow severity
tagsstring[]Tags assigned to the workflow
dataobjectCustom workflow data

Workflow events#

  • workflow.created: This webhook is triggered when a workflow is created. The payload contains the details of the event.
  • workflow.deleted: This webhook is triggered when a workflow is deleted. The payload contains the details of the event.
  • workflow.published: This webhook is triggered when a workflow event occurs, that is when a workflow is synced from dev to prod environment. The payload contains the details of the event.
  • workflow.updated: This webhook is triggered when a workflow is updated. The payload contains the details of the event.

Workflow payload#

Workflow events carry one of two shapes, so check the table below before parsing.

Eventdata.objectdata.previousObject
workflow.createdWorkflow responseNot sent
workflow.updatedWorkflow responseStored workflow, as persisted before the update
workflow.publishedWorkflow responseWorkflow response, as published before this sync
workflow.deletedStored workflowNot sent

The workflow response is the same shape the Workflows API returns, including workflowId, name, description, active, tags, steps, origin, status, severity, preferences, issues, createdAt, and updatedAt.

The stored workflow is the raw persisted document, so it uses internal field names rather than API names.

FieldTypeDescription
_idstringIdentifier of the workflow
namestringName of the workflow
descriptionstringDescription of the workflow
activebooleanWhether the workflow is active
draftbooleanWhether the workflow is a draft
criticalbooleanWhether the workflow ignores subscriber preferences
tagsstring[]Tags assigned to the workflow
triggersarrayWorkflow triggers, each with type, identifier, and declared variables
stepsarrayPersisted workflow steps, including stepId, _templateId, template, controls, and issues
preferenceSettingsobjectPer-channel preference defaults stored on the workflow
issuesRecord<string, array>Runtime issues recorded on the workflow
_environmentIdstringEnvironment identifier
_organizationIdstringOrganization identifier
_notificationGroupIdstringNotification group identifier
originstringWorkflow origin
statusstringWorkflow status
severitystringWorkflow severity
payloadSchemaobjectPayload JSON Schema for the workflow
deletedbooleanDeletion state captured before the event is processed. workflow.deleted normally carries false here
createdAtstringCreation timestamp
updatedAtstringLast updated timestamp
Note

On workflow.updated, previousObject may also include userPreferences and defaultPreferences when the update went through a workflow patch. Treat both fields as optional.