Newsletters
Receive notifications when newsletter subscriptions are created or updated.
Overview
Newsletter webhooks notify your application when newsletter subscriptions are created or modified. Use these events to sync subscriber data with your email marketing platform or mailing list provider.
Use Cases
- Sync new subscribers to your email service provider (Mailchimp, SendGrid, etc.)
- Update subscriber preferences when mailing list selections change
- Track consent information for GDPR compliance
- Trigger welcome emails for new newsletter sign-ups
- Maintain an external subscriber database
Events
| Event | Description |
|---|---|
newsletter.created | A new newsletter subscription was created |
newsletter.updated | An existing newsletter subscription was modified |
newsletter.created
Triggered When
- A visitor subscribes to a newsletter via the SDK
- A newsletter subscription is created via the Core API
Payload
{
"type": "newsletter.created",
"id": "evt_a1B2c3D4e5F6g7H8i9J0k1L2",
"created": 1704067200,
"data": {
"object": {
"id": 100001,
"site_id": 1,
"consent_type": "",
"consent_text": "",
"consent_ip": "",
"consent_url": "",
"lists": "emlBreakingNewsAlerts,emlDailyAlerts,promoteEditorial,promoteEvents",
"source": "",
"email": "[email protected]",
"first_name": null,
"last_name": null,
"postal_code": null,
"created_at": "2026-01-01T12:00:00.000000Z",
"updated_at": "2026-01-01T12:00:00.000000Z",
"deleted_at": null,
"object": "newsletter"
}
}
}newsletter.updated
Triggered When
- A subscriber updates their newsletter preferences via the SDK
- A newsletter subscription is updated via the Core API
Payload
The payload includes a previous_attributes object containing only the fields that changed.
{
"type": "newsletter.updated",
"id": "evt_b2C3d4E5f6G7h8I9j0K1l2M3",
"created": 1704153600,
"data": {
"object": {
"id": 100001,
"site_id": 1,
"consent_type": "explicit",
"consent_text": "I agree to receive newsletters",
"consent_ip": "203.0.113.50",
"consent_url": "https://www.example.com/",
"lists": "emlDailyDigest,emlWeeklySummary,emlBreakingNews",
"source": "web",
"email": "[email protected]",
"first_name": "Jane",
"last_name": "Doe",
"postal_code": null,
"created_at": "2024-05-15T10:30:00.000000Z",
"updated_at": "2026-01-02T12:00:00.000000Z",
"deleted_at": null,
"object": "newsletter"
},
"previous_attributes": {
"consent_url": "https://www.example.com/news/article-title"
}
}
}Payload Fields
Newsletter Object
| Field | Type | Description |
|---|---|---|
object | string | Object type identifier, always newsletter |
id | integer | Unique identifier for the newsletter subscription |
site_id | integer | Site the subscription belongs to |
email | string | Subscriber email address |
first_name | string | null | Subscriber first name |
last_name | string | null | Subscriber last name |
postal_code | string | null | Subscriber postal/zip code |
lists | string | null | Comma-separated list of subscribed mailing lists. null when fully unsubscribed |
source | string | How the subscription was created (e.g., web, empty string if not set) |
consent_type | string | Type of consent given (e.g., explicit, empty string if not set) |
consent_text | string | Consent text the subscriber agreed to |
consent_ip | string | IP address at time of consent |
consent_url | string | URL where consent was given |
created_at | string | ISO 8601 timestamp when the subscription was created |
updated_at | string | ISO 8601 timestamp when the subscription was last modified |
deleted_at | string | null | ISO 8601 timestamp if soft-deleted, otherwise null |
Previous Attributes (newsletter.updated only)
| Field | Type | Description |
|---|---|---|
previous_attributes | object | Contains only the fields that changed, with their previous values before the update |
Related
- Webhooks Overview - Setup, signatures, and configuration
Updated about 7 hours ago
