ResendWebhookMsg

@Serializable
data class ResendWebhookMsg(val createdAt: String, val data: Data, val type: String)

Represents a webhook message received from the Resend email service.

This is the top-level envelope containing the event type, timestamp, and event-specific Data. Decode incoming request bodies with verifyAndDecode, which checks the Svix signature Resend sends (svix-id, svix-timestamp, svix-signature) before decoding. decode decodes without that check, so a handler that acts on what it returns, unverified, will accept forged events from anyone who knows the endpoint. Both tolerate fields Resend adds later, and only email.* events decode; see decode.

Constructors

Link copied to clipboard
constructor(createdAt: String, data: Data, type: String)

Types

Link copied to clipboard
object Companion

Properties

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

the ISO 8601 timestamp when the webhook event was created.

Link copied to clipboard
@SerialName(value = "data")
val data: Data

the event-specific payload containing email and event details.

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

the event type (e.g., "email.sent", "email.bounced", "email.clicked").