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 decode, which tolerates fields Resend adds later. Only email.* events decode; see decode.

This type models the payload only. It does not verify the Svix signature headers Resend sends (svix-id, svix-timestamp, svix-signature), so a handler that trusts unverified requests will accept forged events; verify the signature before decoding.

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").