MailSlurpWebhookControllerApi

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
GetAllWebhookResultsGet /webhooks/resultsGet results for all webhooks
GetAllWebhooksGet /webhooks/paginatedList Webhooks Paginated
GetInboxWebhooksPaginatedGet /inboxes/{inboxId}/webhooks/paginatedGet paginated webhooks for an Inbox
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
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
GetWebhooksGet /inboxes/{inboxId}/webhooksGet all webhooks for an Inbox
SendTestDataPost /webhooks/{webhookId}/testSend webhook test data

CreateWebhook

WebhookDto CreateWebhook(ctx, 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.

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
inboxIdstringinboxId
webhookOptionsCreateWebhookOptionswebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

DeleteWebhook

DeleteWebhook(ctx, inboxId, webhookId)

Delete and disable a Webhook for an Inbox

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
inboxIdstringinboxId
webhookIdstringwebhookId

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAllWebhookResults

PageWebhookResult GetAllWebhookResults(ctx, optional)

Get results for all webhooks

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
optional*GetAllWebhookResultsOptsoptional parametersnil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAllWebhookResultsOpts struct

NameTypeDescriptionNotes
pageoptional.Int32Optional page in list pagination[default to 0]
searchFilteroptional.StringOptional search filter
sizeoptional.Int32Optional page size in list pagination[default to 20]
sortoptional.StringOptional createdAt sort direction ASC or DESC[default to ASC]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetAllWebhooks

PageWebhookProjection GetAllWebhooks(ctx, optional)

List Webhooks Paginated

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

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
optional*GetAllWebhooksOptsoptional parametersnil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetAllWebhooksOpts struct

NameTypeDescriptionNotes
pageoptional.Int32Optional page in list pagination[default to 0]
searchFilteroptional.StringOptional search filter
sizeoptional.Int32Optional page size in list pagination[default to 20]
sortoptional.StringOptional createdAt sort direction ASC or DESC[default to ASC]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetInboxWebhooksPaginated

PageWebhookProjection GetInboxWebhooksPaginated(ctx, inboxId, optional)

Get paginated webhooks for an Inbox

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
inboxIdstringinboxId
optional*GetInboxWebhooksPaginatedOptsoptional parametersnil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetInboxWebhooksPaginatedOpts struct

NameTypeDescriptionNotes

page | optional.Int32| Optional page in list pagination | [default to 0] searchFilter | optional.String| Optional search filter | size | optional.Int32| Optional page size in list pagination | [default to 20] sort | optional.String| Optional createdAt sort direction ASC or DESC | [default to ASC]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayload

AbstractWebhookPayload GetTestWebhookPayload(ctx, optional)

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

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
optional*GetTestWebhookPayloadOptsoptional parametersnil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetTestWebhookPayloadOpts struct

NameTypeDescriptionNotes
eventNameoptional.StringeventName

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadEmailOpened

WebhookEmailOpenedPayload GetTestWebhookPayloadEmailOpened(ctx, )

Get webhook test payload for email opened event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailOpenedPayload

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadNewAttachment

WebhookNewAttachmentPayload GetTestWebhookPayloadNewAttachment(ctx, )

Get webhook test payload for new attachment event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookNewAttachmentPayload

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadNewContact

WebhookNewContactPayload GetTestWebhookPayloadNewContact(ctx, )

Get webhook test payload for new contact event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookNewContactPayload

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetTestWebhookPayloadNewEmail

WebhookNewEmailPayload GetTestWebhookPayloadNewEmail(ctx, )

Get webhook test payload for new email event

Required Parameters

This endpoint does not need any parameter.

Return type

WebhookNewEmailPayload

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhook

WebhookDto GetWebhook(ctx, webhookId)

Get a webhook for an Inbox

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
webhookIdstringwebhookId

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhookResult

WebhookResultEntity GetWebhookResult(ctx, webhookResultId)

Get a webhook result for a webhook

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
webhookResultIdstringWebhook Result ID

Return type

WebhookResultEntity

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhookResults

PageWebhookResult GetWebhookResults(ctx, webhookId, optional)

Get a webhook results for a webhook

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
webhookIdstringID of webhook to get results for
optional*GetWebhookResultsOptsoptional parametersnil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a GetWebhookResultsOpts struct

NameTypeDescriptionNotes

page | optional.Int32| Optional page in list pagination | [default to 0] searchFilter | optional.String| Optional search filter | size | optional.Int32| Optional page size in list pagination | [default to 20] sort | optional.String| Optional createdAt sort direction ASC or DESC | [default to ASC]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

GetWebhooks

[]WebhookDto GetWebhooks(ctx, inboxId)

Get all webhooks for an Inbox

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
inboxIdstringinboxId

Return type

**[]WebhookDto**

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]

SendTestData

WebhookTestResult SendTestData(ctx, webhookId)

Send webhook test data

Required Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
webhookIdstringwebhookId

Return type

WebhookTestResult

Authorization

API_KEY

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to ]