MailSlurp JS

Globals / WebhookControllerApi

# Class: WebhookControllerApi

WebhookControllerApi - object-oriented interface

export

# Hierarchy

# Index

# Constructors

# Properties

# Methods

# Constructors

# constructor

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

Inherited from BaseAPI.constructor

Defined in src/generated/api.ts:57 (opens new window)

# Parameters:

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

Returns: WebhookControllerApi

# Properties

# basePath

Protected basePath: string

Inherited from BaseAPI.basePath

Defined in src/generated/api.ts:61 (opens new window)


# configuration

Protected configuration: Configuration

Inherited from BaseAPI.configuration

Defined in src/generated/api.ts:57 (opens new window)


# fetch

Protected fetch: FetchAPI

Inherited from BaseAPI.fetch

Defined in src/generated/api.ts:62 (opens new window)

# Methods

# createWebhook

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

Defined in src/generated/api.ts:14723 (opens new window)

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:14744 (opens new window)

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:14762 (opens new window)

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"
options? any

Returns: Promise<PageWebhookProjection>


# getWebhook

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

Defined in src/generated/api.ts:14784 (opens new window)

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:14799 (opens new window)

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:14814 (opens new window)

summary Send webhook test data

throws {RequiredError}

memberof WebhookControllerApi

# Parameters:

Name Type Description
webhookId string webhookId
options? any -

Returns: Promise<WebhookTestResult>