Skip to content

Class: WebhookControllerApi

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WebhookControllerApi(configuration?)

Parameters

Name Type
configuration Configuration

Inherited from

BaseAPI.constructor

Properties

configuration

Protected configuration: Configuration

Inherited from

BaseAPI.configuration

Methods

createAccountWebhook

createAccountWebhook(requestParameters, initOverrides?): Promise<WebhookDto>

Get notified of account level events such as bounce and bounce recipient. Attach a WebHook URL to an inbox

Parameters

Name Type
requestParameters CreateAccountWebhookRequest
initOverrides? RequestInit

Returns

Promise<WebhookDto>


createAccountWebhookRaw

createAccountWebhookRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookDto>>

Get notified of account level events such as bounce and bounce recipient. Attach a WebHook URL to an inbox

Parameters

Name Type
requestParameters CreateAccountWebhookRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookDto>>


createWebhook

createWebhook(requestParameters, initOverrides?): Promise<WebhookDto>

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. Attach a WebHook URL to an inbox

Parameters

Name Type
requestParameters CreateWebhookRequest
initOverrides? RequestInit

Returns

Promise<WebhookDto>


createWebhookForPhoneNumber

createWebhookForPhoneNumber(requestParameters, initOverrides?): Promise<WebhookDto>

Get notified whenever a phone number receives an SMS via a WebHook URL. Attach a WebHook URL to a phone number

Parameters

Name Type
requestParameters CreateWebhookForPhoneNumberRequest
initOverrides? RequestInit

Returns

Promise<WebhookDto>


createWebhookForPhoneNumberRaw

createWebhookForPhoneNumberRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookDto>>

Get notified whenever a phone number receives an SMS via a WebHook URL. Attach a WebHook URL to a phone number

Parameters

Name Type
requestParameters CreateWebhookForPhoneNumberRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookDto>>


createWebhookRaw

createWebhookRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookDto>>

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. Attach a WebHook URL to an inbox

Parameters

Name Type
requestParameters CreateWebhookRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookDto>>


deleteAllWebhooks

deleteAllWebhooks(requestParameters, initOverrides?): Promise<void>

Delete all webhooks

Parameters

Name Type
requestParameters DeleteAllWebhooksRequest
initOverrides? RequestInit

Returns

Promise<void>


deleteAllWebhooksRaw

deleteAllWebhooksRaw(requestParameters, initOverrides?): Promise<ApiResponse<void>>

Delete all webhooks

Parameters

Name Type
requestParameters DeleteAllWebhooksRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<void>>


deleteWebhook

deleteWebhook(requestParameters, initOverrides?): Promise<void>

Delete and disable a Webhook for an Inbox

Parameters

Name Type
requestParameters DeleteWebhookRequest
initOverrides? RequestInit

Returns

Promise<void>


deleteWebhookById

deleteWebhookById(requestParameters, initOverrides?): Promise<void>

Delete a webhook

Parameters

Name Type
requestParameters DeleteWebhookByIdRequest
initOverrides? RequestInit

Returns

Promise<void>


deleteWebhookByIdRaw

deleteWebhookByIdRaw(requestParameters, initOverrides?): Promise<ApiResponse<void>>

Delete a webhook

Parameters

Name Type
requestParameters DeleteWebhookByIdRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<void>>


deleteWebhookRaw

deleteWebhookRaw(requestParameters, initOverrides?): Promise<ApiResponse<void>>

Delete and disable a Webhook for an Inbox

Parameters

Name Type
requestParameters DeleteWebhookRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<void>>


getAllAccountWebhooks

getAllAccountWebhooks(requestParameters, initOverrides?): Promise<PageWebhookProjection>

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

Parameters

Name Type
requestParameters GetAllAccountWebhooksRequest
initOverrides? RequestInit

Returns

Promise<PageWebhookProjection>


getAllAccountWebhooksRaw

getAllAccountWebhooksRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageWebhookProjection>>

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

Parameters

Name Type
requestParameters GetAllAccountWebhooksRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<PageWebhookProjection>>


getAllWebhookResults

getAllWebhookResults(requestParameters, initOverrides?): Promise<PageWebhookResult>

Get results for all webhooks

Parameters

Name Type
requestParameters GetAllWebhookResultsRequest
initOverrides? RequestInit

Returns

Promise<PageWebhookResult>


getAllWebhookResultsRaw

getAllWebhookResultsRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageWebhookResult>>

Get results for all webhooks

Parameters

Name Type
requestParameters GetAllWebhookResultsRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<PageWebhookResult>>


getAllWebhooks

getAllWebhooks(requestParameters, initOverrides?): Promise<PageWebhookProjection>

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

Parameters

Name Type
requestParameters GetAllWebhooksRequest
initOverrides? RequestInit

Returns

Promise<PageWebhookProjection>


getAllWebhooksRaw

getAllWebhooksRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageWebhookProjection>>

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

Parameters

Name Type
requestParameters GetAllWebhooksRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<PageWebhookProjection>>


getInboxWebhooksPaginated

getInboxWebhooksPaginated(requestParameters, initOverrides?): Promise<PageWebhookProjection>

Get paginated webhooks for an Inbox

Parameters

Name Type
requestParameters GetInboxWebhooksPaginatedRequest
initOverrides? RequestInit

Returns

Promise<PageWebhookProjection>


getInboxWebhooksPaginatedRaw

getInboxWebhooksPaginatedRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageWebhookProjection>>

Get paginated webhooks for an Inbox

Parameters

Name Type
requestParameters GetInboxWebhooksPaginatedRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<PageWebhookProjection>>


getJsonSchemaForWebhookEvent

getJsonSchemaForWebhookEvent(requestParameters, initOverrides?): Promise<JSONSchemaDto>

Get JSON Schema definition for webhook payload by event

Parameters

Name Type
requestParameters GetJsonSchemaForWebhookEventRequest
initOverrides? RequestInit

Returns

Promise<JSONSchemaDto>


getJsonSchemaForWebhookEventRaw

getJsonSchemaForWebhookEventRaw(requestParameters, initOverrides?): Promise<ApiResponse<JSONSchemaDto>>

Get JSON Schema definition for webhook payload by event

Parameters

Name Type
requestParameters GetJsonSchemaForWebhookEventRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<JSONSchemaDto>>


getJsonSchemaForWebhookPayload

getJsonSchemaForWebhookPayload(requestParameters, initOverrides?): Promise<JSONSchemaDto>

Get JSON Schema definition for webhook payload

Parameters

Name Type
requestParameters GetJsonSchemaForWebhookPayloadRequest
initOverrides? RequestInit

Returns

Promise<JSONSchemaDto>


getJsonSchemaForWebhookPayloadRaw

getJsonSchemaForWebhookPayloadRaw(requestParameters, initOverrides?): Promise<ApiResponse<JSONSchemaDto>>

Get JSON Schema definition for webhook payload

Parameters

Name Type
requestParameters GetJsonSchemaForWebhookPayloadRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<JSONSchemaDto>>


getPhoneNumberWebhooksPaginated

getPhoneNumberWebhooksPaginated(requestParameters, initOverrides?): Promise<PageWebhookProjection>

Get paginated webhooks for a phone number

Parameters

Name Type
requestParameters GetPhoneNumberWebhooksPaginatedRequest
initOverrides? RequestInit

Returns

Promise<PageWebhookProjection>


getPhoneNumberWebhooksPaginatedRaw

getPhoneNumberWebhooksPaginatedRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageWebhookProjection>>

Get paginated webhooks for a phone number

Parameters

Name Type
requestParameters GetPhoneNumberWebhooksPaginatedRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<PageWebhookProjection>>


getTestWebhookPayload

getTestWebhookPayload(requestParameters, initOverrides?): Promise<AbstractWebhookPayload>

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

Parameters

Name Type
requestParameters GetTestWebhookPayloadRequest
initOverrides? RequestInit

Returns

Promise<AbstractWebhookPayload>


getTestWebhookPayloadBounce

getTestWebhookPayloadBounce(initOverrides?): Promise<WebhookBouncePayload>

Get webhook test payload for bounce

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookBouncePayload>


getTestWebhookPayloadBounceRaw

getTestWebhookPayloadBounceRaw(initOverrides?): Promise<ApiResponse<WebhookBouncePayload>>

Get webhook test payload for bounce

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookBouncePayload>>


getTestWebhookPayloadBounceRecipient

getTestWebhookPayloadBounceRecipient(initOverrides?): Promise<WebhookBounceRecipientPayload>

Get webhook test payload for bounce recipient

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookBounceRecipientPayload>


getTestWebhookPayloadBounceRecipientRaw

getTestWebhookPayloadBounceRecipientRaw(initOverrides?): Promise<ApiResponse<WebhookBounceRecipientPayload>>

Get webhook test payload for bounce recipient

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookBounceRecipientPayload>>


getTestWebhookPayloadDeliveryStatus

getTestWebhookPayloadDeliveryStatus(initOverrides?): Promise<WebhookDeliveryStatusPayload>

Get webhook test payload for delivery status event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookDeliveryStatusPayload>


getTestWebhookPayloadDeliveryStatusRaw

getTestWebhookPayloadDeliveryStatusRaw(initOverrides?): Promise<ApiResponse<WebhookDeliveryStatusPayload>>

Get webhook test payload for delivery status event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookDeliveryStatusPayload>>


getTestWebhookPayloadEmailOpened

getTestWebhookPayloadEmailOpened(initOverrides?): Promise<WebhookEmailOpenedPayload>

Get webhook test payload for email opened event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookEmailOpenedPayload>


getTestWebhookPayloadEmailOpenedRaw

getTestWebhookPayloadEmailOpenedRaw(initOverrides?): Promise<ApiResponse<WebhookEmailOpenedPayload>>

Get webhook test payload for email opened event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookEmailOpenedPayload>>


getTestWebhookPayloadEmailRead

getTestWebhookPayloadEmailRead(initOverrides?): Promise<WebhookEmailReadPayload>

Get webhook test payload for email opened event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookEmailReadPayload>


getTestWebhookPayloadEmailReadRaw

getTestWebhookPayloadEmailReadRaw(initOverrides?): Promise<ApiResponse<WebhookEmailReadPayload>>

Get webhook test payload for email opened event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookEmailReadPayload>>


getTestWebhookPayloadForWebhook

getTestWebhookPayloadForWebhook(requestParameters, initOverrides?): Promise<AbstractWebhookPayload>

Get example payload for webhook

Parameters

Name Type
requestParameters GetTestWebhookPayloadForWebhookRequest
initOverrides? RequestInit

Returns

Promise<AbstractWebhookPayload>


getTestWebhookPayloadForWebhookRaw

getTestWebhookPayloadForWebhookRaw(requestParameters, initOverrides?): Promise<ApiResponse<AbstractWebhookPayload>>

Get example payload for webhook

Parameters

Name Type
requestParameters GetTestWebhookPayloadForWebhookRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<AbstractWebhookPayload>>


getTestWebhookPayloadNewAttachment

getTestWebhookPayloadNewAttachment(initOverrides?): Promise<WebhookNewAttachmentPayload>

Get webhook test payload for new attachment event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookNewAttachmentPayload>


getTestWebhookPayloadNewAttachmentRaw

getTestWebhookPayloadNewAttachmentRaw(initOverrides?): Promise<ApiResponse<WebhookNewAttachmentPayload>>

Get webhook test payload for new attachment event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookNewAttachmentPayload>>


getTestWebhookPayloadNewContact

getTestWebhookPayloadNewContact(initOverrides?): Promise<WebhookNewContactPayload>

Get webhook test payload for new contact event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookNewContactPayload>


getTestWebhookPayloadNewContactRaw

getTestWebhookPayloadNewContactRaw(initOverrides?): Promise<ApiResponse<WebhookNewContactPayload>>

Get webhook test payload for new contact event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookNewContactPayload>>


getTestWebhookPayloadNewEmail

getTestWebhookPayloadNewEmail(initOverrides?): Promise<WebhookNewEmailPayload>

Get webhook test payload for new email event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookNewEmailPayload>


getTestWebhookPayloadNewEmailRaw

getTestWebhookPayloadNewEmailRaw(initOverrides?): Promise<ApiResponse<WebhookNewEmailPayload>>

Get webhook test payload for new email event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookNewEmailPayload>>


getTestWebhookPayloadNewSms

getTestWebhookPayloadNewSms(initOverrides?): Promise<WebhookNewSmsPayload>

Get webhook test payload for new sms event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<WebhookNewSmsPayload>


getTestWebhookPayloadNewSmsRaw

getTestWebhookPayloadNewSmsRaw(initOverrides?): Promise<ApiResponse<WebhookNewSmsPayload>>

Get webhook test payload for new sms event

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookNewSmsPayload>>


getTestWebhookPayloadRaw

getTestWebhookPayloadRaw(requestParameters, initOverrides?): Promise<ApiResponse<AbstractWebhookPayload>>

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

Parameters

Name Type
requestParameters GetTestWebhookPayloadRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<AbstractWebhookPayload>>


getWebhook

getWebhook(requestParameters, initOverrides?): Promise<WebhookDto>

Get a webhook

Parameters

Name Type
requestParameters GetWebhookRequest
initOverrides? RequestInit

Returns

Promise<WebhookDto>


getWebhookRaw

getWebhookRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookDto>>

Get a webhook

Parameters

Name Type
requestParameters GetWebhookRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookDto>>


getWebhookResult

getWebhookResult(requestParameters, initOverrides?): Promise<WebhookResultDto>

Get a webhook result for a webhook

Parameters

Name Type
requestParameters GetWebhookResultRequest
initOverrides? RequestInit

Returns

Promise<WebhookResultDto>


getWebhookResultRaw

getWebhookResultRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookResultDto>>

Get a webhook result for a webhook

Parameters

Name Type
requestParameters GetWebhookResultRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookResultDto>>


getWebhookResults

getWebhookResults(requestParameters, initOverrides?): Promise<PageWebhookResult>

Get a webhook results for a webhook

Parameters

Name Type
requestParameters GetWebhookResultsRequest
initOverrides? RequestInit

Returns

Promise<PageWebhookResult>


getWebhookResultsRaw

getWebhookResultsRaw(requestParameters, initOverrides?): Promise<ApiResponse<PageWebhookResult>>

Get a webhook results for a webhook

Parameters

Name Type
requestParameters GetWebhookResultsRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<PageWebhookResult>>


getWebhookResultsUnseenErrorCount

getWebhookResultsUnseenErrorCount(initOverrides?): Promise<UnseenErrorCountDto>

Get count of unseen webhook results with error status

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<UnseenErrorCountDto>


getWebhookResultsUnseenErrorCountRaw

getWebhookResultsUnseenErrorCountRaw(initOverrides?): Promise<ApiResponse<UnseenErrorCountDto>>

Get count of unseen webhook results with error status

Parameters

Name Type
initOverrides? RequestInit

Returns

Promise<ApiResponse<UnseenErrorCountDto>>


getWebhooks

getWebhooks(requestParameters, initOverrides?): Promise<WebhookDto[]>

Get all webhooks for an Inbox

Parameters

Name Type
requestParameters GetWebhooksRequest
initOverrides? RequestInit

Returns

Promise<WebhookDto[]>


getWebhooksRaw

getWebhooksRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookDto[]>>

Get all webhooks for an Inbox

Parameters

Name Type
requestParameters GetWebhooksRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookDto[]>>


redriveWebhookResult

redriveWebhookResult(requestParameters, initOverrides?): Promise<WebhookRedriveResult>

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. Get a webhook result and try to resend the original webhook payload

Parameters

Name Type
requestParameters RedriveWebhookResultRequest
initOverrides? RequestInit

Returns

Promise<WebhookRedriveResult>


redriveWebhookResultRaw

redriveWebhookResultRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookRedriveResult>>

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. Get a webhook result and try to resend the original webhook payload

Parameters

Name Type
requestParameters RedriveWebhookResultRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookRedriveResult>>


request

Protected request(context, initOverrides?): Promise<Response>

Parameters

Name Type
context RequestOpts
initOverrides? RequestInit

Returns

Promise<Response>

Inherited from

BaseAPI.request


sendTestData

sendTestData(requestParameters, initOverrides?): Promise<WebhookTestResult>

Send webhook test data

Parameters

Name Type
requestParameters SendTestDataRequest
initOverrides? RequestInit

Returns

Promise<WebhookTestResult>


sendTestDataRaw

sendTestDataRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookTestResult>>

Send webhook test data

Parameters

Name Type
requestParameters SendTestDataRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookTestResult>>


updateWebhookHeaders

updateWebhookHeaders(requestParameters, initOverrides?): Promise<WebhookDto>

Update a webhook request headers

Parameters

Name Type
requestParameters UpdateWebhookHeadersRequest
initOverrides? RequestInit

Returns

Promise<WebhookDto>


updateWebhookHeadersRaw

updateWebhookHeadersRaw(requestParameters, initOverrides?): Promise<ApiResponse<WebhookDto>>

Update a webhook request headers

Parameters

Name Type
requestParameters UpdateWebhookHeadersRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<WebhookDto>>


verifyWebhookSignature

verifyWebhookSignature(requestParameters, initOverrides?): Promise<VerifyWebhookSignatureResults>

Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. Verify a webhook payload signature

Parameters

Name Type
requestParameters VerifyWebhookSignatureRequest
initOverrides? RequestInit

Returns

Promise<VerifyWebhookSignatureResults>


verifyWebhookSignatureRaw

verifyWebhookSignatureRaw(requestParameters, initOverrides?): Promise<ApiResponse<VerifyWebhookSignatureResults>>

Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server. Verify a webhook payload signature

Parameters

Name Type
requestParameters VerifyWebhookSignatureRequest
initOverrides? RequestInit

Returns

Promise<ApiResponse<VerifyWebhookSignatureResults>>


withMiddleware

withMiddleware<T>(this, ...middlewares): T

Type parameters

Name Type
T extends BaseAPI<T>

Parameters

Name Type
this T
...middlewares Middleware[]

Returns

T

Inherited from

BaseAPI.withMiddleware


withPostMiddleware

withPostMiddleware<T>(this, ...postMiddlewares): T

Type parameters

Name Type
T extends BaseAPI<T>

Parameters

Name Type
this T
...postMiddlewares (context: ResponseContext) => Promise<void

Returns

T

Inherited from

BaseAPI.withPostMiddleware


withPreMiddleware

withPreMiddleware<T>(this, ...preMiddlewares): T

Type parameters

Name Type
T extends BaseAPI<T>

Parameters

Name Type
this T
...preMiddlewares (context: RequestContext) => Promise<void

Returns

T

Inherited from

BaseAPI.withPreMiddleware