# Class: WebhookControllerApi

WebhookControllerApi - object-oriented interface

export

class WebhookControllerApi

extends {BaseAPI}

# Hierarchy

# Constructors

# constructor

+ new WebhookControllerApi(configuration?: Configuration, basePath: string, fetch: FetchAPI): WebhookControllerApi

Inherited from BaseAPI.constructor

Defined in src/generated/api.ts:57

Parameters:

Name Type Default
configuration? Configuration -
basePath string BASE_PATH
fetch FetchAPI portableFetch

Returns: WebhookControllerApi

# Properties

# Protected basePath

basePath: string

Inherited from BaseAPI.basePath

Defined in src/generated/api.ts:61


# Protected configuration

configuration: Configuration

Inherited from BaseAPI.configuration

Defined in src/generated/api.ts:57


# Protected fetch

fetch: FetchAPI

Inherited from BaseAPI.fetch

Defined in src/generated/api.ts:62

# Methods

# createWebhook

createWebhook(inboxId: string, webhookOptions: CreateWebhookOptions, options?: any): Promise‹WebhookDto

Defined in src/generated/api.ts:12721

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.

summary Attach a WebHook URL to an inbox

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

Name Type Description
inboxId string inboxId
webhookOptions CreateWebhookOptions webhookOptions
options? any -

Returns: Promise‹WebhookDto


# deleteWebhook

deleteWebhook(inboxId: string, webhookId: string, options?: any): Promise‹Response›

Defined in src/generated/api.ts:12742

summary Delete and disable a Webhook for an Inbox

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

Name Type Description
inboxId string inboxId
webhookId string webhookId
options? any -

Returns: Promise‹Response›


# getAllWebhooks

getAllWebhooks(page?: number, size?: number, sort?: "ASC" | "DESC", options?: any): Promise‹PageWebhookProjection

Defined in src/generated/api.ts:12760

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

summary List Webhooks Paginated

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

Name Type
page? number
size? number
sort? "ASC" | "DESC"
options? any

Returns: Promise‹PageWebhookProjection


# getWebhook

getWebhook(webhookId: string, options?: any): Promise‹WebhookDto

Defined in src/generated/api.ts:12782

summary Get a webhook for an Inbox

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

Name Type Description
webhookId string webhookId
options? any -

Returns: Promise‹WebhookDto


# getWebhooks

getWebhooks(inboxId: string, options?: any): Promise‹WebhookDto[]›

Defined in src/generated/api.ts:12797

summary Get all Webhooks for an Inbox

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

Name Type Description
inboxId string inboxId
options? any -

Returns: Promise‹WebhookDto[]›


# sendTestData

sendTestData(webhookId: string, options?: any): Promise‹WebhookTestResult

Defined in src/generated/api.ts:12812

summary Send webhook test data

throws {RequiredError}

memberof WebhookControllerApi

Parameters:

Name Type Description
webhookId string webhookId
options? any -

Returns: Promise‹WebhookTestResult