MailSlurpClient::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

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.

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
inbox_id = 'inbox_id_example' # String | inboxId
webhook_options = MailSlurpClient::CreateWebhookOptions.new # CreateWebhookOptions | webhookOptions

begin
  #Attach a WebHook URL to an inbox
  result = api_instance.create_webhook(inbox_id, webhook_options)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->create_webhook: #{e}"
end

Parameters

NameTypeDescriptionNotes
inbox_idStringinboxId
webhook_optionsCreateWebhookOptionswebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

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

delete_all_webhooks

delete_all_webhooks

Delete all webhooks

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new

begin
  #Delete all webhooks
  api_instance.delete_all_webhooks
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->delete_all_webhooks: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

nil (empty response body)

Authorization

API_KEY

HTTP request headers

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

delete_webhook

delete_webhook(inbox_id, webhook_id)

Delete and disable a Webhook for an Inbox

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
inbox_id = 'inbox_id_example' # String | inboxId
webhook_id = 'webhook_id_example' # String | webhookId

begin
  #Delete and disable a Webhook for an Inbox
  api_instance.delete_webhook(inbox_id, webhook_id)
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->delete_webhook: #{e}"
end

Parameters

NameTypeDescriptionNotes
inbox_idStringinboxId
webhook_idStringwebhookId

Return type

nil (empty response body)

Authorization

API_KEY

HTTP request headers

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

get_all_webhook_results

PageWebhookResult get_all_webhook_results(opts)

Get results for all webhooks

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
opts = {
  before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at before the given timestamp
  page: 0, # Integer | Optional page  in list pagination
  search_filter: 'search_filter_example', # String | Optional search filter
  since: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at after the given timestamp
  size: 20, # Integer | Optional page size in list pagination
  sort: 'ASC', # String | Optional createdAt sort direction ASC or DESC
  unseen_only: true # Boolean | Filter for unseen exceptions only
}

begin
  #Get results for all webhooks
  result = api_instance.get_all_webhook_results(opts)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_all_webhook_results: #{e}"
end

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
pageIntegerOptional page in list pagination[optional] [default to 0]
search_filterStringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeIntegerOptional page size in list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]
unseen_onlyBooleanFilter for unseen exceptions only[optional]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

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

get_all_webhooks

PageWebhookProjection get_all_webhooks(opts)

List Webhooks Paginated

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

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
opts = {
  before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at before the given timestamp
  page: 0, # Integer | Optional page  in list pagination
  search_filter: 'search_filter_example', # String | Optional search filter
  since: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at after the given timestamp
  size: 20, # Integer | Optional page size for paginated result list.
  sort: 'DESC' # String | Optional createdAt sort direction ASC or DESC
}

begin
  #List Webhooks Paginated
  result = api_instance.get_all_webhooks(opts)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_all_webhooks: #{e}"
end

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
pageIntegerOptional page in list pagination[optional] [default to 0]
search_filterStringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeIntegerOptional page size for paginated result list.[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ‘DESC’]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

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

get_inbox_webhooks_paginated

PageWebhookProjection get_inbox_webhooks_paginated(inbox_id, opts)

Get paginated webhooks for an Inbox

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
inbox_id = 'inbox_id_example' # String | inboxId
opts = {
  before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at before the given timestamp
  page: 0, # Integer | Optional page  in list pagination
  search_filter: 'search_filter_example', # String | Optional search filter
  since: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at after the given timestamp
  size: 20, # Integer | Optional page size in list pagination
  sort: 'ASC' # String | Optional createdAt sort direction ASC or DESC
}

begin
  #Get paginated webhooks for an Inbox
  result = api_instance.get_inbox_webhooks_paginated(inbox_id, opts)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_inbox_webhooks_paginated: #{e}"
end

Parameters

NameTypeDescriptionNotes
inbox_idStringinboxId
beforeDateTimeFilter by created at before the given timestamp[optional]
pageIntegerOptional page in list pagination[optional] [default to 0]
search_filterStringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeIntegerOptional page size in list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

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

get_json_schema_for_webhook_payload

JSONSchemaDto get_json_schema_for_webhook_payload(webhook_id)

Get JSON Schema definition for webhook payload

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
webhook_id = 'webhook_id_example' # String | webhookId

begin
  #Get JSON Schema definition for webhook payload
  result = api_instance.get_json_schema_for_webhook_payload(webhook_id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_json_schema_for_webhook_payload: #{e}"
end

Parameters

NameTypeDescriptionNotes
webhook_idStringwebhookId

Return type

JSONSchemaDto

Authorization

API_KEY

HTTP request headers

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

get_test_webhook_payload

AbstractWebhookPayload get_test_webhook_payload(opts)

Get test webhook payload example. Response content depends on eventName passed. Uses EMAIL_RECEIVED as default.

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
opts = {
  event_name: 'event_name_example' # String | eventName
}

begin
  #Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
  result = api_instance.get_test_webhook_payload(opts)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_test_webhook_payload: #{e}"
end

Parameters

NameTypeDescriptionNotes
event_nameStringeventName[optional]

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

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

get_test_webhook_payload_email_opened

WebhookEmailOpenedPayload get_test_webhook_payload_email_opened

Get webhook test payload for email opened event

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new

begin
  #Get webhook test payload for email opened event
  result = api_instance.get_test_webhook_payload_email_opened
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_test_webhook_payload_email_opened: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailOpenedPayload

Authorization

API_KEY

HTTP request headers

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

get_test_webhook_payload_email_read

WebhookEmailReadPayload get_test_webhook_payload_email_read

Get webhook test payload for email opened event

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new

begin
  #Get webhook test payload for email opened event
  result = api_instance.get_test_webhook_payload_email_read
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_test_webhook_payload_email_read: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailReadPayload

Authorization

API_KEY

HTTP request headers

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

get_test_webhook_payload_for_webhook

AbstractWebhookPayload get_test_webhook_payload_for_webhook(webhook_id)

Get example payload for webhook

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
webhook_id = 'webhook_id_example' # String | webhookId

begin
  #Get example payload for webhook
  result = api_instance.get_test_webhook_payload_for_webhook(webhook_id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_test_webhook_payload_for_webhook: #{e}"
end

Parameters

NameTypeDescriptionNotes
webhook_idStringwebhookId

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

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

get_test_webhook_payload_new_attachment

WebhookNewAttachmentPayload get_test_webhook_payload_new_attachment

Get webhook test payload for new attachment event

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new

begin
  #Get webhook test payload for new attachment event
  result = api_instance.get_test_webhook_payload_new_attachment
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_test_webhook_payload_new_attachment: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewAttachmentPayload

Authorization

API_KEY

HTTP request headers

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

get_test_webhook_payload_new_contact

WebhookNewContactPayload get_test_webhook_payload_new_contact

Get webhook test payload for new contact event

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new

begin
  #Get webhook test payload for new contact event
  result = api_instance.get_test_webhook_payload_new_contact
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_test_webhook_payload_new_contact: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewContactPayload

Authorization

API_KEY

HTTP request headers

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

get_test_webhook_payload_new_email

WebhookNewEmailPayload get_test_webhook_payload_new_email

Get webhook test payload for new email event

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new

begin
  #Get webhook test payload for new email event
  result = api_instance.get_test_webhook_payload_new_email
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_test_webhook_payload_new_email: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewEmailPayload

Authorization

API_KEY

HTTP request headers

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

get_webhook

WebhookDto get_webhook(webhook_id)

Get a webhook for an Inbox

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
webhook_id = 'webhook_id_example' # String | webhookId

begin
  #Get a webhook for an Inbox
  result = api_instance.get_webhook(webhook_id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_webhook: #{e}"
end

Parameters

NameTypeDescriptionNotes
webhook_idStringwebhookId

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

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

get_webhook_result

WebhookResultDto get_webhook_result(webhook_result_id)

Get a webhook result for a webhook

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
webhook_result_id = 'webhook_result_id_example' # String | Webhook Result ID

begin
  #Get a webhook result for a webhook
  result = api_instance.get_webhook_result(webhook_result_id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_webhook_result: #{e}"
end

Parameters

NameTypeDescriptionNotes
webhook_result_idStringWebhook Result ID

Return type

WebhookResultDto

Authorization

API_KEY

HTTP request headers

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

get_webhook_results

PageWebhookResult get_webhook_results(webhook_id, opts)

Get a webhook results for a webhook

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
webhook_id = 'webhook_id_example' # String | ID of webhook to get results for
opts = {
  before: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at before the given timestamp
  page: 0, # Integer | Optional page  in list pagination
  search_filter: 'search_filter_example', # String | Optional search filter
  since: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter by created at after the given timestamp
  size: 20, # Integer | Optional page size in list pagination
  sort: 'ASC', # String | Optional createdAt sort direction ASC or DESC
  unseen_only: true # Boolean | Filter for unseen exceptions only
}

begin
  #Get a webhook results for a webhook
  result = api_instance.get_webhook_results(webhook_id, opts)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_webhook_results: #{e}"
end

Parameters

NameTypeDescriptionNotes
webhook_idStringID of webhook to get results for
beforeDateTimeFilter by created at before the given timestamp[optional]
pageIntegerOptional page in list pagination[optional] [default to 0]
search_filterStringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeIntegerOptional page size in list pagination[optional] [default to 20]
sortStringOptional createdAt sort direction ASC or DESC[optional] [default to ‘ASC’]
unseen_onlyBooleanFilter for unseen exceptions only[optional]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

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

get_webhook_results_unseen_error_count

UnseenErrorCountDto get_webhook_results_unseen_error_count(inbox_id)

Get count of unseen webhook results with error status

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
inbox_id = 'inbox_id_example' # String | inboxId

begin
  #Get count of unseen webhook results with error status
  result = api_instance.get_webhook_results_unseen_error_count(inbox_id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_webhook_results_unseen_error_count: #{e}"
end

Parameters

NameTypeDescriptionNotes
inbox_idStringinboxId

Return type

UnseenErrorCountDto

Authorization

API_KEY

HTTP request headers

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

get_webhooks

Array get_webhooks(inbox_id)

Get all webhooks for an Inbox

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
inbox_id = 'inbox_id_example' # String | inboxId

begin
  #Get all webhooks for an Inbox
  result = api_instance.get_webhooks(inbox_id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->get_webhooks: #{e}"
end

Parameters

NameTypeDescriptionNotes
inbox_idStringinboxId

Return type

Array

Authorization

API_KEY

HTTP request headers

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

redrive_webhook_result

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.

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
webhook_result_id = 'webhook_result_id_example' # String | Webhook Result ID

begin
  #Get a webhook result and try to resend the original webhook payload
  result = api_instance.redrive_webhook_result(webhook_result_id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->redrive_webhook_result: #{e}"
end

Parameters

NameTypeDescriptionNotes
webhook_result_idStringWebhook Result ID

Return type

WebhookRedriveResult

Authorization

API_KEY

HTTP request headers

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

send_test_data

WebhookTestResult send_test_data(webhook_id)

Send webhook test data

Example

# load the gem
require 'mailslurp_client'
# setup authorization
MailSlurpClient.configure do |config|
  # Configure API key authorization: API_KEY
  config.api_key['x-api-key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['x-api-key'] = 'Bearer'
end

api_instance = MailSlurpClient::WebhookControllerApi.new
webhook_id = 'webhook_id_example' # String | webhookId

begin
  #Send webhook test data
  result = api_instance.send_test_data(webhook_id)
  p result
rescue MailSlurpClient::ApiError => e
  puts "Exception when calling WebhookControllerApi->send_test_data: #{e}"
end

Parameters

NameTypeDescriptionNotes
webhook_idStringwebhookId

Return type

WebhookTestResult

Authorization

API_KEY

HTTP request headers

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