WebhookControllerApi

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

MethodHTTP requestDescription
createWebhookPOST /inboxes/{inboxId}/webhooksAttach a WebHook URL to an inbox
deleteWebhookDELETE /inboxes/{inboxId}/webhooks/{webhookId}Delete and disable a Webhook for an Inbox
getAllWebhooksGET /webhooks/paginatedList Webhooks Paginated
getTestWebhookPayloadGET /webhooks/testGet test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.
getWebhookGET /webhooks/{webhookId}Get a webhook for an Inbox
getWebhooksGET /inboxes/{inboxId}/webhooksGet all webhooks for an Inbox
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

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

getAllWebhooks

PageWebhookProjection getAllWebhooks(page, size, sort)

List Webhooks Paginated

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

Parameters

NameTypeDescriptionNotes
pageIntegerOptional page in list pagination[optional] [default to 0]
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

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]

Return type

AbstractWebhookPayload

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

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

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