Class: WebhookControllerApi

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new WebhookControllerApi(configuration?)

Parameters

NameType
configurationConfiguration

Inherited from

BaseAPI.constructor

Properties

configuration

Protected configuration: Configuration

Inherited from

BaseAPI.configuration

Methods

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

NameType
requestParametersCreateWebhookRequest
initOverrides?RequestInit

Returns

Promise<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

NameType
requestParametersCreateWebhookRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookDto»


deleteAllWebhooks

deleteAllWebhooks(initOverrides?): Promise<void>

Delete all webhooks

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<void>


deleteAllWebhooksRaw

deleteAllWebhooksRaw(initOverrides?): Promise<ApiResponse<void»

Delete all webhooks

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<void»


deleteWebhook

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

Delete and disable a Webhook for an Inbox

Parameters

NameType
requestParametersDeleteWebhookRequest
initOverrides?RequestInit

Returns

Promise<void>


deleteWebhookRaw

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

Delete and disable a Webhook for an Inbox

Parameters

NameType
requestParametersDeleteWebhookRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<void»


getAllWebhookResults

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

Get results for all webhooks

Parameters

NameType
requestParametersGetAllWebhookResultsRequest
initOverrides?RequestInit

Returns

Promise<PageWebhookResult>


getAllWebhookResultsRaw

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

Get results for all webhooks

Parameters

NameType
requestParametersGetAllWebhookResultsRequest
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

NameType
requestParametersGetAllWebhooksRequest
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

NameType
requestParametersGetAllWebhooksRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageWebhookProjection»


getInboxWebhooksPaginated

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

Get paginated webhooks for an Inbox

Parameters

NameType
requestParametersGetInboxWebhooksPaginatedRequest
initOverrides?RequestInit

Returns

Promise<PageWebhookProjection>


getInboxWebhooksPaginatedRaw

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

Get paginated webhooks for an Inbox

Parameters

NameType
requestParametersGetInboxWebhooksPaginatedRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageWebhookProjection»


getJsonSchemaForWebhookPayload

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

Get JSON Schema definition for webhook payload

Parameters

NameType
requestParametersGetJsonSchemaForWebhookPayloadRequest
initOverrides?RequestInit

Returns

Promise<JSONSchemaDto>


getJsonSchemaForWebhookPayloadRaw

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

Get JSON Schema definition for webhook payload

Parameters

NameType
requestParametersGetJsonSchemaForWebhookPayloadRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<JSONSchemaDto»


getTestWebhookPayload

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

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

Parameters

NameType
requestParametersGetTestWebhookPayloadRequest
initOverrides?RequestInit

Returns

Promise<AbstractWebhookPayload>


getTestWebhookPayloadEmailOpened

getTestWebhookPayloadEmailOpened(initOverrides?): Promise<WebhookEmailOpenedPayload>

Get webhook test payload for email opened event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<WebhookEmailOpenedPayload>


getTestWebhookPayloadEmailOpenedRaw

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

Get webhook test payload for email opened event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookEmailOpenedPayload»


getTestWebhookPayloadEmailRead

getTestWebhookPayloadEmailRead(initOverrides?): Promise<WebhookEmailReadPayload>

Get webhook test payload for email opened event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<WebhookEmailReadPayload>


getTestWebhookPayloadEmailReadRaw

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

Get webhook test payload for email opened event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookEmailReadPayload»


getTestWebhookPayloadForWebhook

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

Get example payload for webhook

Parameters

NameType
requestParametersGetTestWebhookPayloadForWebhookRequest
initOverrides?RequestInit

Returns

Promise<AbstractWebhookPayload>


getTestWebhookPayloadForWebhookRaw

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

Get example payload for webhook

Parameters

NameType
requestParametersGetTestWebhookPayloadForWebhookRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<AbstractWebhookPayload»


getTestWebhookPayloadNewAttachment

getTestWebhookPayloadNewAttachment(initOverrides?): Promise<WebhookNewAttachmentPayload>

Get webhook test payload for new attachment event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<WebhookNewAttachmentPayload>


getTestWebhookPayloadNewAttachmentRaw

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

Get webhook test payload for new attachment event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookNewAttachmentPayload»


getTestWebhookPayloadNewContact

getTestWebhookPayloadNewContact(initOverrides?): Promise<WebhookNewContactPayload>

Get webhook test payload for new contact event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<WebhookNewContactPayload>


getTestWebhookPayloadNewContactRaw

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

Get webhook test payload for new contact event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookNewContactPayload»


getTestWebhookPayloadNewEmail

getTestWebhookPayloadNewEmail(initOverrides?): Promise<WebhookNewEmailPayload>

Get webhook test payload for new email event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<WebhookNewEmailPayload>


getTestWebhookPayloadNewEmailRaw

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

Get webhook test payload for new email event

Parameters

NameType
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookNewEmailPayload»


getTestWebhookPayloadRaw

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

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

Parameters

NameType
requestParametersGetTestWebhookPayloadRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<AbstractWebhookPayload»


getWebhook

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

Get a webhook for an Inbox

Parameters

NameType
requestParametersGetWebhookRequest
initOverrides?RequestInit

Returns

Promise<WebhookDto>


getWebhookRaw

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

Get a webhook for an Inbox

Parameters

NameType
requestParametersGetWebhookRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookDto»


getWebhookResult

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

Get a webhook result for a webhook

Parameters

NameType
requestParametersGetWebhookResultRequest
initOverrides?RequestInit

Returns

Promise<WebhookResultDto>


getWebhookResultRaw

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

Get a webhook result for a webhook

Parameters

NameType
requestParametersGetWebhookResultRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookResultDto»


getWebhookResults

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

Get a webhook results for a webhook

Parameters

NameType
requestParametersGetWebhookResultsRequest
initOverrides?RequestInit

Returns

Promise<PageWebhookResult>


getWebhookResultsRaw

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

Get a webhook results for a webhook

Parameters

NameType
requestParametersGetWebhookResultsRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<PageWebhookResult»


getWebhookResultsUnseenErrorCount

getWebhookResultsUnseenErrorCount(requestParameters, initOverrides?): Promise<UnseenErrorCountDto>

Get count of unseen webhook results with error status

Parameters

NameType
requestParametersGetWebhookResultsUnseenErrorCountRequest
initOverrides?RequestInit

Returns

Promise<UnseenErrorCountDto>


getWebhookResultsUnseenErrorCountRaw

getWebhookResultsUnseenErrorCountRaw(requestParameters, initOverrides?): Promise<ApiResponse<UnseenErrorCountDto»

Get count of unseen webhook results with error status

Parameters

NameType
requestParametersGetWebhookResultsUnseenErrorCountRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<UnseenErrorCountDto»


getWebhooks

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

Get all webhooks for an Inbox

Parameters

NameType
requestParametersGetWebhooksRequest
initOverrides?RequestInit

Returns

Promise<WebhookDto[]>


getWebhooksRaw

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

Get all webhooks for an Inbox

Parameters

NameType
requestParametersGetWebhooksRequest
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

NameType
requestParametersRedriveWebhookResultRequest
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

NameType
requestParametersRedriveWebhookResultRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookRedriveResult»


request

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

Parameters

NameType
contextRequestOpts
initOverrides?RequestInit

Returns

Promise<Response>

Inherited from

BaseAPI.request


sendTestData

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

Send webhook test data

Parameters

NameType
requestParametersSendTestDataRequest
initOverrides?RequestInit

Returns

Promise<WebhookTestResult>


sendTestDataRaw

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

Send webhook test data

Parameters

NameType
requestParametersSendTestDataRequest
initOverrides?RequestInit

Returns

Promise<ApiResponse<WebhookTestResult»


withMiddleware

withMiddleware<T>(…middlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...middlewaresMiddleware[]

Returns

T

Inherited from

BaseAPI.withMiddleware


withPostMiddleware

withPostMiddleware<T>(…postMiddlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...postMiddlewares(context: ResponseContext) => Promise<void

Returns

T

Inherited from

BaseAPI.withPostMiddleware


withPreMiddleware

withPreMiddleware<T>(…preMiddlewares): T

Type parameters

NameType
Textends BaseAPI<T>

Parameters

NameType
...preMiddlewares(context: RequestContext) => Promise<void

Returns

T

Inherited from

BaseAPI.withPreMiddleware