Decodes a webhook payload.
Dispatching is based on the payload's event_type field. SMTP delivery statuses do not carry an event_type, so a body with a status field and no recognized event type is decoded as a delivery status.
event_type
status
The raw JSON payload bytes, or a decoded string.
The decoded event.
Error When the body is not valid JSON or the payload is unrecognized.
Error
Decodes a webhook payload.
Dispatching is based on the payload's
event_typefield. SMTP delivery statuses do not carry anevent_type, so a body with astatusfield and no recognized event type is decoded as a delivery status.