Skip to content

CreateWebhookOptions

Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale.

Properties

Name Type Description Notes
url String Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation.
basicAuth BasicAuthOptions [optional]
name String Optional name for the webhook [optional]
eventName EventNameEnum Optional webhook event name. Default is EMAIL_RECEIVED and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. [optional]
includeHeaders WebhookHeaders [optional]

Enum: EventNameEnum

Name Value
EMAIL_RECEIVED "EMAIL_RECEIVED"
NEW_EMAIL "NEW_EMAIL"
NEW_CONTACT "NEW_CONTACT"
NEW_ATTACHMENT "NEW_ATTACHMENT"
EMAIL_OPENED "EMAIL_OPENED"
EMAIL_READ "EMAIL_READ"
DELIVERY_STATUS "DELIVERY_STATUS"
BOUNCE "BOUNCE"
BOUNCE_RECIPIENT "BOUNCE_RECIPIENT"
NEW_SMS "NEW_SMS"