Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Resend.Webhooks/ContactEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ public class ContactEventData : IWebhookData
[JsonPropertyName( "id" )]
public Guid ContactId { get; set; }

/// <summary />
[JsonPropertyName( "audience_id" )]
[JsonIgnore( Condition = JsonIgnoreCondition.WhenWritingNull )]
public string? AudienceId { get; set; }

/// <summary />
[JsonPropertyName( "segment_ids" )]
[JsonIgnore( Condition = JsonIgnoreCondition.WhenWritingNull )]
Expand Down
28 changes: 28 additions & 0 deletions src/Resend.Webhooks/EmailEventData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ public class EmailEventData : IWebhookData
[JsonPropertyName( "subject" )]
public string Subject { get; set; } = default!;

/// <summary />
[JsonPropertyName( "broadcast_id" )]
public string? BroadcastId { get; set; }
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.

/// <summary />
[JsonPropertyName( "template_id" )]
public string? TemplateId { get; set; }

/// <summary />
[JsonPropertyName( "tags" )]
public Dictionary<string, string>? Tags { get; set; }

/// <summary />
/// <remarks>
/// Only set for <see cref="WebhookEventType.EmailClicked" />, otherwise is null.
Expand All @@ -41,6 +53,14 @@ public class EmailEventData : IWebhookData
[JsonPropertyName( "bounce" )]
[JsonIgnore( Condition = JsonIgnoreCondition.WhenWritingNull )]
public EmailBounceData? Bounce { get; set; }

/// <summary />
/// <remarks>
/// Only set for <see cref="WebhookEventType.EmailFailed"/>
/// </remarks>
[JsonPropertyName( "failed" )]
[JsonIgnore( Condition = JsonIgnoreCondition.WhenWritingNull )]
public EmailFailedData? Failed { get; set; }
}


Expand Down Expand Up @@ -82,4 +102,12 @@ public class EmailClickData
/// <summary />
[JsonPropertyName( "userAgent" )]
public string UserAgent { get; set; } = default!;
}

/// <summary />
public class EmailFailedData
{
/// <summary />
[JsonPropertyName( "reason" )]
public string Reason { get; set; } = default!;
}