WebhookControllerApi

All URIs are relative to https://api.mailslurp.com

MethodHTTP requestDescription
create_webhookpost /inboxes/{inboxId}/webhooksAttach a WebHook URL to an inbox
delete_all_webhooksdelete /webhooksDelete all webhooks
delete_webhookdelete /inboxes/{inboxId}/webhooks/{webhookId}Delete and disable a Webhook for an Inbox
get_all_webhook_resultsget /webhooks/resultsGet results for all webhooks
get_all_webhooksget /webhooks/paginatedList Webhooks Paginated
get_inbox_webhooks_paginatedget /inboxes/{inboxId}/webhooks/paginatedGet paginated webhooks for an Inbox
get_json_schema_for_webhook_payloadpost /webhooks/{webhookId}/schemaGet JSON Schema definition for webhook payload
get_test_webhook_payloadget /webhooks/testGet test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.
get_test_webhook_payload_email_openedget /webhooks/test/email-opened-payloadGet webhook test payload for email opened event
get_test_webhook_payload_email_readget /webhooks/test/email-read-payloadGet webhook test payload for email opened event
get_test_webhook_payload_for_webhookpost /webhooks/{webhookId}/exampleGet example payload for webhook
get_test_webhook_payload_new_attachmentget /webhooks/test/new-attachment-payloadGet webhook test payload for new attachment event
get_test_webhook_payload_new_contactget /webhooks/test/new-contact-payloadGet webhook test payload for new contact event
get_test_webhook_payload_new_emailget /webhooks/test/new-email-payloadGet webhook test payload for new email event
get_webhookget /webhooks/{webhookId}Get a webhook for an Inbox
get_webhook_resultget /webhooks/results/{webhookResultId}Get a webhook result for a webhook
get_webhook_resultsget /webhooks/{webhookId}/resultsGet a webhook results for a webhook
get_webhook_results_unseen_error_countget /webhooks/results/unseen-countGet count of unseen webhook results with error status
get_webhooksget /inboxes/{inboxId}/webhooksGet all webhooks for an Inbox
redrive_webhook_resultpost /webhooks/results/{webhookResultId}/redriveGet a webhook result and try to resend the original webhook payload
send_test_datapost /webhooks/{webhookId}/testSend webhook test data

create_webhook

crate::models::WebhookDto create_webhook(inbox_id, webhook_options) 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

NameTypeDescriptionRequiredNotes
inbox_idStringinboxId[required]
webhook_optionsCreateWebhookOptionswebhookOptions[required]

Return type

crate::models::WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_all_webhooks

delete_all_webhooks() Delete all webhooks

Parameters

This endpoint does not need any parameter.

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

delete_webhook

delete_webhook(inbox_id, webhook_id) Delete and disable a Webhook for an Inbox

Parameters

NameTypeDescriptionRequiredNotes
inbox_idStringinboxId[required]
webhook_idStringwebhookId[required]

Return type

(empty response body)

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_all_webhook_results

crate::models::PageWebhookResult get_all_webhook_results(before, page, search_filter, since, size, sort, unseen_only) Get results for all webhooks

Parameters

NameTypeDescriptionRequiredNotes
beforeOption<String>Filter by created at before the given timestamp
pageOption<i32>Optional page in list pagination[default to 0]
search_filterOption<String>Optional search filter
sinceOption<String>Filter by created at after the given timestamp
sizeOption<i32>Optional page size in list pagination[default to 20]
sortOption<String>Optional createdAt sort direction ASC or DESC[default to ASC]
unseen_onlyOption<bool>Filter for unseen exceptions only

Return type

crate::models::PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_all_webhooks

crate::models::PageWebhookProjection get_all_webhooks(before, page, search_filter, since, size, sort) List Webhooks Paginated

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

Parameters

NameTypeDescriptionRequiredNotes
beforeOption<String>Filter by created at before the given timestamp
pageOption<i32>Optional page in list pagination[default to 0]
search_filterOption<String>Optional search filter
sinceOption<String>Filter by created at after the given timestamp
sizeOption<i32>Optional page size for paginated result list.[default to 20]
sortOption<String>Optional createdAt sort direction ASC or DESC[default to DESC]

Return type

crate::models::PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_inbox_webhooks_paginated

crate::models::PageWebhookProjection get_inbox_webhooks_paginated(inbox_id, before, page, search_filter, since, size, sort) Get paginated webhooks for an Inbox

Parameters

NameTypeDescriptionRequiredNotes
inbox_idStringinboxId[required]
beforeOption<String>Filter by created at before the given timestamp
pageOption<i32>Optional page in list pagination[default to 0]
search_filterOption<String>Optional search filter
sinceOption<String>Filter by created at after the given timestamp
sizeOption<i32>Optional page size in list pagination[default to 20]
sortOption<String>Optional createdAt sort direction ASC or DESC[default to ASC]

Return type

crate::models::PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_json_schema_for_webhook_payload

crate::models::JsonSchemaDto get_json_schema_for_webhook_payload(webhook_id) Get JSON Schema definition for webhook payload

Parameters

NameTypeDescriptionRequiredNotes
webhook_idStringwebhookId[required]

Return type

crate::models::JsonSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_test_webhook_payload

crate::models::AbstractWebhookPayload get_test_webhook_payload(event_name) Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.

Parameters

NameTypeDescriptionRequiredNotes
event_nameOption<String>eventName

Return type

crate::models::AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_test_webhook_payload_email_opened

crate::models::WebhookEmailOpenedPayload get_test_webhook_payload_email_opened() Get webhook test payload for email opened event

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookEmailOpenedPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_test_webhook_payload_email_read

crate::models::WebhookEmailReadPayload get_test_webhook_payload_email_read() Get webhook test payload for email opened event

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookEmailReadPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_test_webhook_payload_for_webhook

crate::models::AbstractWebhookPayload get_test_webhook_payload_for_webhook(webhook_id) Get example payload for webhook

Parameters

NameTypeDescriptionRequiredNotes
webhook_idStringwebhookId[required]

Return type

crate::models::AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_test_webhook_payload_new_attachment

crate::models::WebhookNewAttachmentPayload get_test_webhook_payload_new_attachment() Get webhook test payload for new attachment event

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookNewAttachmentPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_test_webhook_payload_new_contact

crate::models::WebhookNewContactPayload get_test_webhook_payload_new_contact() Get webhook test payload for new contact event

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookNewContactPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_test_webhook_payload_new_email

crate::models::WebhookNewEmailPayload get_test_webhook_payload_new_email() Get webhook test payload for new email event

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookNewEmailPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_webhook

crate::models::WebhookDto get_webhook(webhook_id) Get a webhook for an Inbox

Parameters

NameTypeDescriptionRequiredNotes
webhook_idStringwebhookId[required]

Return type

crate::models::WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_webhook_result

crate::models::WebhookResultDto get_webhook_result(webhook_result_id) Get a webhook result for a webhook

Parameters

NameTypeDescriptionRequiredNotes
webhook_result_idStringWebhook Result ID[required]

Return type

crate::models::WebhookResultDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_webhook_results

crate::models::PageWebhookResult get_webhook_results(webhook_id, before, page, search_filter, since, size, sort, unseen_only) Get a webhook results for a webhook

Parameters

NameTypeDescriptionRequiredNotes
webhook_idStringID of webhook to get results for[required]
beforeOption<String>Filter by created at before the given timestamp
pageOption<i32>Optional page in list pagination[default to 0]
search_filterOption<String>Optional search filter
sinceOption<String>Filter by created at after the given timestamp
sizeOption<i32>Optional page size in list pagination[default to 20]
sortOption<String>Optional createdAt sort direction ASC or DESC[default to ASC]
unseen_onlyOption<bool>Filter for unseen exceptions only

Return type

crate::models::PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_webhook_results_unseen_error_count

crate::models::UnseenErrorCountDto get_webhook_results_unseen_error_count(inbox_id) Get count of unseen webhook results with error status

Parameters

NameTypeDescriptionRequiredNotes
inbox_idStringinboxId[required]

Return type

crate::models::UnseenErrorCountDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

get_webhooks

Veccrate::models::WebhookDto get_webhooks(inbox_id) Get all webhooks for an Inbox

Parameters

NameTypeDescriptionRequiredNotes
inbox_idStringinboxId[required]

Return type

Veccrate::models::WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

redrive_webhook_result

crate::models::WebhookRedriveResult redrive_webhook_result(webhook_result_id) Get a webhook result and try to resend the original webhook payload

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.

Parameters

NameTypeDescriptionRequiredNotes
webhook_result_idStringWebhook Result ID[required]

Return type

crate::models::WebhookRedriveResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]

send_test_data

crate::models::WebhookTestResult send_test_data(webhook_id) Send webhook test data

Parameters

NameTypeDescriptionRequiredNotes
webhook_idStringwebhookId[required]

Return type

crate::models::WebhookTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to ]