Skip to content

\WebhookControllerApi

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

Method HTTP request Description
create_account_webhook post /webhooks Attach a WebHook URL to an inbox
create_webhook post /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
create_webhook_for_phone_number post /phone/numbers/{phoneNumberId}/webhooks Attach a WebHook URL to a phone number
delete_all_webhooks delete /webhooks Delete all webhooks
delete_webhook delete /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a Webhook for an Inbox
delete_webhook_by_id delete /webhooks/{webhookId} Delete a webhook
get_all_account_webhooks get /webhooks/account/paginated List account webhooks Paginated
get_all_webhook_results get /webhooks/results Get results for all webhooks
get_all_webhooks get /webhooks/paginated List Webhooks Paginated
get_inbox_webhooks_paginated get /inboxes/{inboxId}/webhooks/paginated Get paginated webhooks for an Inbox
get_json_schema_for_webhook_event post /webhooks/schema
get_json_schema_for_webhook_payload post /webhooks/{webhookId}/schema
get_phone_number_webhooks_paginated get /phone/numbers/{phoneId}/webhooks/paginated Get paginated webhooks for a phone number
get_test_webhook_payload get /webhooks/test
get_test_webhook_payload_bounce get /webhooks/test/email-bounce-payload
get_test_webhook_payload_bounce_recipient get /webhooks/test/email-bounce-recipient-payload
get_test_webhook_payload_delivery_status get /webhooks/test/delivery-status-payload Get webhook test payload for delivery status event
get_test_webhook_payload_email_opened get /webhooks/test/email-opened-payload
get_test_webhook_payload_email_read get /webhooks/test/email-read-payload
get_test_webhook_payload_for_webhook post /webhooks/{webhookId}/example
get_test_webhook_payload_new_attachment get /webhooks/test/new-attachment-payload Get webhook test payload for new attachment event
get_test_webhook_payload_new_contact get /webhooks/test/new-contact-payload Get webhook test payload for new contact event
get_test_webhook_payload_new_email get /webhooks/test/new-email-payload Get webhook test payload for new email event
get_test_webhook_payload_new_sms get /webhooks/test/new-sms-payload Get webhook test payload for new sms event
get_webhook get /webhooks/{webhookId} Get a webhook
get_webhook_result get /webhooks/results/{webhookResultId} Get a webhook result for a webhook
get_webhook_results get /webhooks/{webhookId}/results Get a webhook results for a webhook
get_webhook_results_unseen_error_count get /webhooks/results/unseen-count Get count of unseen webhook results with error status
get_webhooks get /inboxes/{inboxId}/webhooks Get all webhooks for an Inbox
redrive_webhook_result post /webhooks/results/{webhookResultId}/redrive Get a webhook result and try to resend the original webhook payload
send_test_data post /webhooks/{webhookId}/test Send webhook test data
update_webhook_headers put /webhooks/{webhookId}/headers Update a webhook request headers
verify_webhook_signature post /webhooks/verify Verify a webhook payload signature

create_account_webhook

crate::models::WebhookDto create_account_webhook(create_webhook_options) Attach a WebHook URL to an inbox

Get notified of account level events such as bounce and bounce recipient.

Parameters

Name Type Description Required Notes
create_webhook_options CreateWebhookOptions [required]

Return type

crate::models::WebhookDto

Authorization

API_KEY

HTTP request headers

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

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

create_webhook

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

Name Type Description Required Notes
inbox_id String [required]
create_webhook_options CreateWebhookOptions [required]

Return type

crate::models::WebhookDto

Authorization

API_KEY

HTTP request headers

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

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

create_webhook_for_phone_number

crate::models::WebhookDto create_webhook_for_phone_number(phone_number_id, create_webhook_options) Attach a WebHook URL to a phone number

Get notified whenever a phone number receives an SMS via a WebHook URL.

Parameters

Name Type Description Required Notes
phone_number_id String [required]
create_webhook_options CreateWebhookOptions [required]

Return type

crate::models::WebhookDto

Authorization

API_KEY

HTTP request headers

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

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

delete_all_webhooks

delete_all_webhooks(before) Delete all webhooks

Parameters

Name Type Description Required Notes
before Option<String> before

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

Name Type Description Required Notes
inbox_id String [required]
webhook_id String [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 ]

delete_webhook_by_id

delete_webhook_by_id(webhook_id) Delete a webhook

Parameters

Name Type Description Required Notes
webhook_id String [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_account_webhooks

crate::models::PageWebhookProjection get_all_account_webhooks(page, size, sort, event_type, since, before) List account webhooks Paginated

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

Parameters

Name Type Description Required Notes
page Option<i32> Optional page in list pagination [default to 0]
size Option<i32> Optional page size for paginated result list. [default to 20]
sort Option<String> Optional createdAt sort direction ASC or DESC [default to DESC]
event_type Option<String> Optional event type
since Option<String> Filter by created at after the given timestamp
before Option<String> Filter by created at before the given timestamp

Return type

crate::models::PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_all_webhook_results

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

Parameters

Name Type Description Required Notes
page Option<i32> Optional page in list pagination [default to 0]
size Option<i32> Optional page size in list pagination [default to 20]
sort Option<String> Optional createdAt sort direction ASC or DESC [default to ASC]
search_filter Option<String> Optional search filter
since Option<String> Filter by created at after the given timestamp
before Option<String> Filter by created at before the given timestamp
unseen_only Option<bool> Filter for unseen exceptions only

Return type

crate::models::PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_all_webhooks

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

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

Parameters

Name Type Description Required Notes
page Option<i32> Optional page in list pagination [default to 0]
size Option<i32> Optional page size for paginated result list. [default to 20]
sort Option<String> Optional createdAt sort direction ASC or DESC [default to DESC]
search_filter Option<String> Optional search filter
since Option<String> Filter by created at after the given timestamp
inbox_id Option<String> Filter by inboxId
phone_id Option<String> Filter by phoneId
before Option<String> Filter by created at before the given timestamp

Return type

crate::models::PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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, page, size, sort, search_filter, since, before) Get paginated webhooks for an Inbox

Parameters

Name Type Description Required Notes
inbox_id String [required]
page Option<i32> Optional page in list pagination [default to 0]
size Option<i32> Optional page size in list pagination [default to 20]
sort Option<String> Optional createdAt sort direction ASC or DESC [default to ASC]
search_filter Option<String> Optional search filter
since Option<String> Filter by created at after the given timestamp
before Option<String> Filter by created at before the given timestamp

Return type

crate::models::PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_json_schema_for_webhook_event

crate::models::JsonSchemaDto get_json_schema_for_webhook_event(event)

Get JSON Schema definition for webhook payload by event

Parameters

Name Type Description Required Notes
event String [required]

Return type

crate::models::JsonSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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

Name Type Description Required Notes
webhook_id String [required]

Return type

crate::models::JsonSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_phone_number_webhooks_paginated

crate::models::PageWebhookProjection get_phone_number_webhooks_paginated(phone_id, page, size, sort, since, before) Get paginated webhooks for a phone number

Parameters

Name Type Description Required Notes
phone_id String [required]
page Option<i32> Optional page in list pagination [default to 0]
size Option<i32> Optional page size in list pagination [default to 20]
sort Option<String> Optional createdAt sort direction ASC or DESC [default to ASC]
since Option<String> Filter by created at after the given timestamp
before Option<String> Filter by created at before the given timestamp

Return type

crate::models::PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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

Name Type Description Required Notes
event_name Option<String>

Return type

crate::models::AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_test_webhook_payload_bounce

crate::models::WebhookBouncePayload get_test_webhook_payload_bounce()

Get webhook test payload for bounce

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookBouncePayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_test_webhook_payload_bounce_recipient

crate::models::WebhookBounceRecipientPayload get_test_webhook_payload_bounce_recipient()

Get webhook test payload for bounce recipient

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookBounceRecipientPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_test_webhook_payload_delivery_status

crate::models::WebhookDeliveryStatusPayload get_test_webhook_payload_delivery_status() Get webhook test payload for delivery status event

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookDeliveryStatusPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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: /

[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: /

[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

Name Type Description Required Notes
webhook_id String [required]

Return type

crate::models::AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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: /

[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: /

[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: /

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

get_test_webhook_payload_new_sms

crate::models::WebhookNewSmsPayload get_test_webhook_payload_new_sms() Get webhook test payload for new sms event

Parameters

This endpoint does not need any parameter.

Return type

crate::models::WebhookNewSmsPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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

Parameters

Name Type Description Required Notes
webhook_id String [required]

Return type

crate::models::WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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

Name Type Description Required Notes
webhook_result_id String Webhook Result ID [required]

Return type

crate::models::WebhookResultDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_webhook_results

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

Parameters

Name Type Description Required Notes
webhook_id String ID of webhook to get results for [required]
page Option<i32> Optional page in list pagination [default to 0]
size Option<i32> Optional page size in list pagination [default to 20]
sort Option<String> Optional createdAt sort direction ASC or DESC [default to ASC]
search_filter Option<String> Optional search filter
since Option<String> Filter by created at after the given timestamp
before Option<String> Filter by created at before the given timestamp
unseen_only Option<bool> Filter for unseen exceptions only

Return type

crate::models::PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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() Get count of unseen webhook results with error status

Parameters

This endpoint does not need any parameter.

Return type

crate::models::UnseenErrorCountDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

get_webhooks

Vec get_webhooks(inbox_id) Get all webhooks for an Inbox

Parameters

Name Type Description Required Notes
inbox_id String [required]

Return type

Vec

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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

Name Type Description Required Notes
webhook_result_id String Webhook Result ID [required]

Return type

crate::models::WebhookRedriveResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

[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

Name Type Description Required Notes
webhook_id String [required]

Return type

crate::models::WebhookTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

update_webhook_headers

crate::models::WebhookDto update_webhook_headers(webhook_id, webhook_headers) Update a webhook request headers

Parameters

Name Type Description Required Notes
webhook_id String [required]
webhook_headers WebhookHeaders [required]

Return type

crate::models::WebhookDto

Authorization

API_KEY

HTTP request headers

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

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

verify_webhook_signature

crate::models::VerifyWebhookSignatureResults verify_webhook_signature(verify_webhook_signature_options) Verify a webhook payload signature

Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.

Parameters

Name Type Description Required Notes
verify_webhook_signature_options VerifyWebhookSignatureOptions [required]

Return type

crate::models::VerifyWebhookSignatureResults

Authorization

API_KEY

HTTP request headers

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

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