WebhookControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
createWebhookPOST /inboxes/{inboxId}/webhooksAttach a WebHook URL to an inbox
deleteAllWebhooksDELETE /webhooksDelete all webhooks
deleteWebhookDELETE /inboxes/{inboxId}/webhooks/{webhookId}Delete and disable a Webhook for an Inbox
getAllWebhookResultsGET /webhooks/resultsGet results for all webhooks
getAllWebhooksGET /webhooks/paginatedList Webhooks Paginated
getInboxWebhooksPaginatedGET /inboxes/{inboxId}/webhooks/paginatedGet paginated webhooks for an Inbox
getJsonSchemaForWebhookPayloadPOST /webhooks/{webhookId}/schemaGet JSON Schema definition for webhook payload
getTestWebhookPayloadGET /webhooks/testGet test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.
getTestWebhookPayloadEmailOpenedGET /webhooks/test/email-opened-payloadGet webhook test payload for email opened event
getTestWebhookPayloadEmailReadGET /webhooks/test/email-read-payloadGet webhook test payload for email opened event
getTestWebhookPayloadForWebhookPOST /webhooks/{webhookId}/exampleGet example payload for webhook
getTestWebhookPayloadNewAttachmentGET /webhooks/test/new-attachment-payloadGet webhook test payload for new attachment event
getTestWebhookPayloadNewContactGET /webhooks/test/new-contact-payloadGet webhook test payload for new contact event
getTestWebhookPayloadNewEmailGET /webhooks/test/new-email-payloadGet webhook test payload for new email event
getWebhookGET /webhooks/{webhookId}Get a webhook for an Inbox
getWebhookResultGET /webhooks/results/{webhookResultId}Get a webhook result for a webhook
getWebhookResultsGET /webhooks/{webhookId}/resultsGet a webhook results for a webhook
getWebhookResultsUnseenErrorCountGET /webhooks/results/unseen-countGet count of unseen webhook results with error status
getWebhooksGET /inboxes/{inboxId}/webhooksGet all webhooks for an Inbox
redriveWebhookResultPOST /webhooks/results/{webhookResultId}/redriveGet a webhook result and try to resend the original webhook payload
sendTestDataPOST /webhooks/{webhookId}/testSend webhook test data

createWebhook

WebhookDto createWebhook(inboxId, webhookOptions)

Attach a WebHook URL to an inbox

Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.

Parameters

NameTypeDescriptionNotes
inboxIdUUIDinboxId[default to null]
webhookOptionsCreateWebhookOptionswebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteAllWebhooks

deleteAllWebhooks()

Delete all webhooks

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

deleteWebhook

deleteWebhook(inboxId, webhookId)

Delete and disable a Webhook for an Inbox

Parameters

NameTypeDescriptionNotes
inboxIdUUIDinboxId[default to null]
webhookIdUUIDwebhookId[default to null]

Return type

null (empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getAllWebhookResults

PageWebhookResult getAllWebhookResults(before, page, searchFilter, since, size, sort, unseenOnly)

Get results for all webhooks

Parameters

NameTypeDescriptionNotes
beforeDateFilter by created at before the given timestamp[optional] [default to null]
pageIntegerOptional page in list pagination[optional] [default to 0]
searchFilterStringOptional search filter[optional] [default to null]
sinceDateFilter by created at after the given timestamp[optional] [default to null]
sizeIntegerOptional page size in list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]
unseenOnlyBooleanFilter for unseen exceptions only[optional] [default to null]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getAllWebhooks

PageWebhookProjection getAllWebhooks(before, page, searchFilter, since, size, sort)

List Webhooks Paginated

List webhooks in paginated form. Allows for page , page size, and sort direction.

Parameters

NameTypeDescriptionNotes
beforeDateFilter by created at before the given timestamp[optional] [default to null]
pageIntegerOptional page in list pagination[optional] [default to 0]
searchFilterStringOptional search filter[optional] [default to null]
sinceDateFilter by created at after the given timestamp[optional] [default to null]
sizeIntegerOptional page size for paginated result list.[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to DESC] [enum: ASC, DESC]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getInboxWebhooksPaginated

PageWebhookProjection getInboxWebhooksPaginated(inboxId, before, page, searchFilter, since, size, sort)

Get paginated webhooks for an Inbox

Parameters

NameTypeDescriptionNotes
inboxIdUUIDinboxId[default to null]
beforeDateFilter by created at before the given timestamp[optional] [default to null]
pageIntegerOptional page in list pagination[optional] [default to 0]
searchFilterStringOptional search filter[optional] [default to null]
sinceDateFilter by created at after the given timestamp[optional] [default to null]
sizeIntegerOptional page size in list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getJsonSchemaForWebhookPayload

JSONSchemaDto getJsonSchemaForWebhookPayload(webhookId)

Get JSON Schema definition for webhook payload

Parameters

NameTypeDescriptionNotes
webhookIdUUIDwebhookId[default to null]

Return type

JSONSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTestWebhookPayload

AbstractWebhookPayload getTestWebhookPayload(eventName)

Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.

Parameters

NameTypeDescriptionNotes
eventNameStringeventName[optional] [default to null] [enum: EMAIL_RECEIVED, NEW_EMAIL, NEW_CONTACT, NEW_ATTACHMENT, EMAIL_OPENED, EMAIL_READ]

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTestWebhookPayloadEmailOpened

WebhookEmailOpenedPayload getTestWebhookPayloadEmailOpened()

Get webhook test payload for email opened event

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailOpenedPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTestWebhookPayloadEmailRead

WebhookEmailReadPayload getTestWebhookPayloadEmailRead()

Get webhook test payload for email opened event

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailReadPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTestWebhookPayloadForWebhook

AbstractWebhookPayload getTestWebhookPayloadForWebhook(webhookId)

Get example payload for webhook

Parameters

NameTypeDescriptionNotes
webhookIdUUIDwebhookId[default to null]

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTestWebhookPayloadNewAttachment

WebhookNewAttachmentPayload getTestWebhookPayloadNewAttachment()

Get webhook test payload for new attachment event

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewAttachmentPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTestWebhookPayloadNewContact

WebhookNewContactPayload getTestWebhookPayloadNewContact()

Get webhook test payload for new contact event

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewContactPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTestWebhookPayloadNewEmail

WebhookNewEmailPayload getTestWebhookPayloadNewEmail()

Get webhook test payload for new email event

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewEmailPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getWebhook

WebhookDto getWebhook(webhookId)

Get a webhook for an Inbox

Parameters

NameTypeDescriptionNotes
webhookIdUUIDwebhookId[default to null]

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getWebhookResult

WebhookResultDto getWebhookResult(webhookResultId)

Get a webhook result for a webhook

Parameters

NameTypeDescriptionNotes
webhookResultIdUUIDWebhook Result ID[default to null]

Return type

WebhookResultDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getWebhookResults

PageWebhookResult getWebhookResults(webhookId, before, page, searchFilter, since, size, sort, unseenOnly)

Get a webhook results for a webhook

Parameters

NameTypeDescriptionNotes
webhookIdUUIDID of webhook to get results for[default to null]
beforeDateFilter by created at before the given timestamp[optional] [default to null]
pageIntegerOptional page in list pagination[optional] [default to 0]
searchFilterStringOptional search filter[optional] [default to null]
sinceDateFilter by created at after the given timestamp[optional] [default to null]
sizeIntegerOptional page size in list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ASC] [enum: ASC, DESC]
unseenOnlyBooleanFilter for unseen exceptions only[optional] [default to null]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getWebhookResultsUnseenErrorCount

UnseenErrorCountDto getWebhookResultsUnseenErrorCount(inboxId)

Get count of unseen webhook results with error status

Parameters

NameTypeDescriptionNotes
inboxIdUUIDinboxId[default to null]

Return type

UnseenErrorCountDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getWebhooks

List getWebhooks(inboxId)

Get all webhooks for an Inbox

Parameters

NameTypeDescriptionNotes
inboxIdUUIDinboxId[default to null]

Return type

List

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

redriveWebhookResult

WebhookRedriveResult redriveWebhookResult(webhookResultId)

Get a webhook result and try to resend the original webhook payload

Allows you to resend a webhook payload that was already sent. Webhooks that fail are retried automatically for 24 hours and then put in a dead letter queue. You can retry results manually using this method.

Parameters

NameTypeDescriptionNotes
webhookResultIdUUIDWebhook Result ID[default to null]

Return type

WebhookRedriveResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

sendTestData

WebhookTestResult sendTestData(webhookId)

Send webhook test data

Parameters

NameTypeDescriptionNotes
webhookIdUUIDwebhookId[default to null]

Return type

WebhookTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json