Data

@Serializable
data class Data(val createdAt: String, val emailId: String, val from: String, val subject: String? = null, val to: List<String>? = null, val headers: List<Header>? = null, val bounce: Bounce? = null, val click: Click? = null, val tags: Map<String, String>? = null, val broadcastId: String? = null, val messageId: String? = null, val templateId: String? = null)

Represents the data payload within a ResendWebhookMsg.

Contains details about the email event such as sender, recipients, and optional bounce or click information. Every field Resend documents as optional, or that only some event types carry, is nullable. Decode with ResendWebhookMsg.decode so fields Resend adds later are ignored rather than failing the whole payload.

Constructors

Link copied to clipboard
constructor(createdAt: String, emailId: String, from: String, subject: String? = null, to: List<String>? = null, headers: List<Header>? = null, bounce: Bounce? = null, click: Click? = null, tags: Map<String, String>? = null, broadcastId: String? = null, messageId: String? = null, templateId: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "bounce")
val bounce: Bounce?

bounce details if this is a bounce event, or null otherwise.

Link copied to clipboard
@SerialName(value = "broadcast_id")
val broadcastId: String?

the identifier of the broadcast that sent the email, or null for a regular send.

Link copied to clipboard
@SerialName(value = "click")
val click: Click?

click details if this is a click event, or null otherwise.

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: String

the ISO 8601 timestamp when the event was created.

Link copied to clipboard
@SerialName(value = "email_id")
val emailId: String

the unique identifier of the email.

Link copied to clipboard
@SerialName(value = "from")
val from: String

the sender email address.

Link copied to clipboard
@SerialName(value = "headers")
val headers: List<Header>?

the list of email headers, or null if not included.

Link copied to clipboard
@SerialName(value = "message_id")
val messageId: String?

the RFC Message-ID header value, or null if not sent.

Link copied to clipboard
@SerialName(value = "subject")
val subject: String?

the email subject line, or null if not available.

Link copied to clipboard
@SerialName(value = "tags")
val tags: Map<String, String>?

the tags attached to the email as key-value pairs, or null if none were sent.

Link copied to clipboard
@SerialName(value = "template_id")
val templateId: String?

the identifier of the template used, or null if none was used.

Link copied to clipboard
@SerialName(value = "to")
val to: List<String>?

the list of recipient email addresses, or null if not available.