Unidy Docs

Newsletters

Find payload fields for newsletter subscription changes and preference deletion.

See the event catalogue for subscription triggers and Envelope and timing for the shared webhook fields.

Newsletter subscription events

newsletter_subscription.created, .updated, and .deleted use the same field names. A newsletter subscription represents an email address's relationship to one newsletter. Product subscriptions have their own payload reference.

FieldTypeMeaning
idintegerNewsletter-subscription database identifier. Do not parse it as a UUID.
unidy_idUUID string, optionalIncluded when newsletter-subscription UUIDs are enabled in the environment. Its presence does not replace id.
user_idUUID string or nullLinked user's UUID. A newsletter subscription can exist without a linked account.
emailstringSubscribed address.
preferencesarray of stringsSelected newsletter preference identifiers.
preference_tokenstringToken used by preference and unsubscribe links. Treat it as a credential and exclude it from routine logs.
internal_namestringNewsletter identifier.
confirmed_attimestamp or nullRecorded newsletter-confirmation state. Check the newsletter's configured confirmation policy when interpreting it.

Example newsletter_subscription value, including the optional UUID:

json
{
  "id": 4812,
  "unidy_id": "ee3b7005-91bd-4989-96b5-3916e9b6404a",
  "user_id": null,
  "email": "person@example.test",
  "preferences": ["weekly-digest"],
  "preference_token": "synthetic-example-token",
  "internal_name": "main",
  "confirmed_at": null
}

Double opt-in confirmation is delivered as newsletter_subscription.updated; there is no separately subscribable newsletter_subscription.confirmed webhook. Compare the confirmation state with what your system stored. An update does not by itself mean consent was newly granted, and this payload is not a complete history of consent changes.

The deletion event retains the same subscription fields captured before removal. It does not become the two-field deletion shape used by product subscriptions. Multi-brand update paths can emit separate events for the same relationship, so include environment and brand context in your processing model.

Newsletter preference events

newsletter_preference.deleted means a configured preference was removed. It does not mean an individual customer opted out of that preference. The newsletter_preference value contains only:

json
{
  "plugin_identifier": "weekly-digest"
}

Use plugin_identifier to remove or reconcile references to that configured option. The event does not list affected customers. Preference creation and update events are not subscribable webhooks.

Was this page helpful?