MailSlurpAPI.Api.WebhookController (mailslurp v11.7.0)

API calls for all endpoints tagged WebhookController.

Link to this section Summary

Functions

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.

Delete and disable a Webhook for an Inbox

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

Get all Webhooks for an Inbox

Link to this section Functions

Link to this function

create_webhook(connection, inbox_id, webhook_options, opts \\ [])

Specs

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.

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • inbox_id (String.t): inboxId
  • webhook_options (CreateWebhookOptions): webhookOptions
  • opts (KeywordList): [optional] Optional parameters

    Returns

} on success {:error, info} on failure

Link to this function

delete_webhook(connection, inbox_id, webhook_id, opts \\ [])

Specs

delete_webhook(Tesla.Env.client(), String.t(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

Delete and disable a Webhook for an Inbox

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • inbox_id (String.t): inboxId
  • webhook_id (String.t): webhookId
  • opts (KeywordList): [optional] Optional parameters

    Returns

} on success {:error, info} on failure

Link to this function

get_all_webhooks(connection, opts \\ [])

Specs

get_all_webhooks(Tesla.Env.client(), keyword()) ::
  {:ok, MailSlurpAPI.Model.PageWebhookProjection.t()} | {:error, Tesla.Env.t()}

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

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :page (integer()): Optional page index in inbox list pagination
    • :size (integer()): Optional page size in inbox list pagination
    • :sort (String.t): Optional createdAt sort direction ASC or DESC

      Returns

} on success {:error, info} on failure

Link to this function

get_webhook(connection, webhook_id, opts \\ [])

Specs

get_webhook(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.WebhookDto.t()} | {:error, Tesla.Env.t()}

Get a webhook for an Inbox

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • webhook_id (String.t): webhookId
  • opts (KeywordList): [optional] Optional parameters

    Returns

} on success {:error, info} on failure

Link to this function

get_webhooks(connection, inbox_id, opts \\ [])

Specs

get_webhooks(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, [MailSlurpAPI.Model.WebhookDto.t()]} | {:error, Tesla.Env.t()}

Get all Webhooks for an Inbox

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • inbox_id (String.t): inboxId
  • opts (KeywordList): [optional] Optional parameters

    Returns

, ...]} on success {:error, info} on failure

Link to this function

send_test_data(connection, webhook_id, opts \\ [])

Specs

send_test_data(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, MailSlurpAPI.Model.WebhookTestResult.t()} | {:error, Tesla.Env.t()}

Send webhook test data

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • webhook_id (String.t): webhookId
  • opts (KeywordList): [optional] Optional parameters

    Returns

} on success {:error, info} on failure