MailSlurp::WebhookControllerApi

Load the API package

use MailSlurp::Object::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 => $inbox_id, webhook_options => $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

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $inbox_id = null; # string | inboxId
my $webhook_options = MailSlurp::Object::CreateWebhookOptions->new(); # CreateWebhookOptions | webhookOptions

eval { 
    my $result = $api_instance->create_webhook(inbox_id => $inbox_id, webhook_options => $webhook_options);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->create_webhook: $@n";
}

Parameters

NameTypeDescriptionNotes
inbox_idstringinboxId
webhook_optionsCreateWebhookOptionswebhookOptions

Return type

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

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);


eval { 
    $api_instance->delete_all_webhooks();
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->delete_all_webhooks: $@n";
}

Parameters

This endpoint does not need any parameter.

Return type

void (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 => $inbox_id, webhook_id => $webhook_id)

Delete and disable a Webhook for an Inbox

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $inbox_id = null; # string | inboxId
my $webhook_id = null; # string | webhookId

eval { 
    $api_instance->delete_webhook(inbox_id => $inbox_id, webhook_id => $webhook_id);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->delete_webhook: $@n";
}

Parameters

NameTypeDescriptionNotes
inbox_idstringinboxId
webhook_idstringwebhookId

Return type

void (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

PageWebhookResult get_all_webhook_results(before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort, unseen_only => $unseen_only)

Get results for all webhooks

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp
my $page = 0; # int | Optional page  in list pagination
my $search_filter = "search_filter_example"; # string | Optional search filter
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $size = 20; # int | Optional page size in list pagination
my $sort = 'ASC'; # string | Optional createdAt sort direction ASC or DESC
my $unseen_only = null; # boolean | Filter for unseen exceptions only

eval { 
    my $result = $api_instance->get_all_webhook_results(before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort, unseen_only => $unseen_only);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_all_webhook_results: $@n";
}

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
pageintOptional page in list pagination[optional] [default to 0]
search_filterstringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeintOptional 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

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

get_all_webhooks

PageWebhookProjection get_all_webhooks(before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort)

List Webhooks Paginated

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

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp
my $page = 0; # int | Optional page  in list pagination
my $search_filter = "search_filter_example"; # string | Optional search filter
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $size = 20; # int | Optional page size for paginated result list.
my $sort = 'DESC'; # string | Optional createdAt sort direction ASC or DESC

eval { 
    my $result = $api_instance->get_all_webhooks(before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_all_webhooks: $@n";
}

Parameters

NameTypeDescriptionNotes
beforeDateTimeFilter by created at before the given timestamp[optional]
pageintOptional page in list pagination[optional] [default to 0]
search_filterstringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeintOptional 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

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

get_inbox_webhooks_paginated

PageWebhookProjection get_inbox_webhooks_paginated(inbox_id => $inbox_id, before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort)

Get paginated webhooks for an Inbox

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $inbox_id = null; # string | inboxId
my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp
my $page = 0; # int | Optional page  in list pagination
my $search_filter = "search_filter_example"; # string | Optional search filter
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $size = 20; # int | Optional page size in list pagination
my $sort = 'ASC'; # string | Optional createdAt sort direction ASC or DESC

eval { 
    my $result = $api_instance->get_inbox_webhooks_paginated(inbox_id => $inbox_id, before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_inbox_webhooks_paginated: $@n";
}

Parameters

NameTypeDescriptionNotes
inbox_idstringinboxId
beforeDateTimeFilter by created at before the given timestamp[optional]
pageintOptional page in list pagination[optional] [default to 0]
search_filterstringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeintOptional 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

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

get_json_schema_for_webhook_payload

JSONSchemaDto get_json_schema_for_webhook_payload(webhook_id => $webhook_id)

Get JSON Schema definition for webhook payload

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $webhook_id = null; # string | webhookId

eval { 
    my $result = $api_instance->get_json_schema_for_webhook_payload(webhook_id => $webhook_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_json_schema_for_webhook_payload: $@n";
}

Parameters

NameTypeDescriptionNotes
webhook_idstringwebhookId

Return type

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

AbstractWebhookPayload get_test_webhook_payload(event_name => $event_name)

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

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $event_name = "event_name_example"; # string | eventName

eval { 
    my $result = $api_instance->get_test_webhook_payload(event_name => $event_name);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_test_webhook_payload: $@n";
}

Parameters

NameTypeDescriptionNotes
event_namestringeventName[optional]

Return type

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

WebhookEmailOpenedPayload get_test_webhook_payload_email_opened()

Get webhook test payload for email opened event

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);


eval { 
    my $result = $api_instance->get_test_webhook_payload_email_opened();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_test_webhook_payload_email_opened: $@n";
}

Parameters

This endpoint does not need any parameter.

Return type

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

WebhookEmailReadPayload get_test_webhook_payload_email_read()

Get webhook test payload for email opened event

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);


eval { 
    my $result = $api_instance->get_test_webhook_payload_email_read();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_test_webhook_payload_email_read: $@n";
}

Parameters

This endpoint does not need any parameter.

Return type

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

AbstractWebhookPayload get_test_webhook_payload_for_webhook(webhook_id => $webhook_id)

Get example payload for webhook

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $webhook_id = null; # string | webhookId

eval { 
    my $result = $api_instance->get_test_webhook_payload_for_webhook(webhook_id => $webhook_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_test_webhook_payload_for_webhook: $@n";
}

Parameters

NameTypeDescriptionNotes
webhook_idstringwebhookId

Return type

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

WebhookNewAttachmentPayload get_test_webhook_payload_new_attachment()

Get webhook test payload for new attachment event

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);


eval { 
    my $result = $api_instance->get_test_webhook_payload_new_attachment();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_test_webhook_payload_new_attachment: $@n";
}

Parameters

This endpoint does not need any parameter.

Return type

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

WebhookNewContactPayload get_test_webhook_payload_new_contact()

Get webhook test payload for new contact event

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);


eval { 
    my $result = $api_instance->get_test_webhook_payload_new_contact();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_test_webhook_payload_new_contact: $@n";
}

Parameters

This endpoint does not need any parameter.

Return type

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

WebhookNewEmailPayload get_test_webhook_payload_new_email()

Get webhook test payload for new email event

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);


eval { 
    my $result = $api_instance->get_test_webhook_payload_new_email();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_test_webhook_payload_new_email: $@n";
}

Parameters

This endpoint does not need any parameter.

Return type

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

WebhookDto get_webhook(webhook_id => $webhook_id)

Get a webhook for an Inbox

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $webhook_id = null; # string | webhookId

eval { 
    my $result = $api_instance->get_webhook(webhook_id => $webhook_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_webhook: $@n";
}

Parameters

NameTypeDescriptionNotes
webhook_idstringwebhookId

Return type

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

WebhookResultDto get_webhook_result(webhook_result_id => $webhook_result_id)

Get a webhook result for a webhook

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $webhook_result_id = null; # string | Webhook Result ID

eval { 
    my $result = $api_instance->get_webhook_result(webhook_result_id => $webhook_result_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_webhook_result: $@n";
}

Parameters

NameTypeDescriptionNotes
webhook_result_idstringWebhook Result ID

Return type

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

PageWebhookResult get_webhook_results(webhook_id => $webhook_id, before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort, unseen_only => $unseen_only)

Get a webhook results for a webhook

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $webhook_id = null; # string | ID of webhook to get results for
my $before = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at before the given timestamp
my $page = 0; # int | Optional page  in list pagination
my $search_filter = "search_filter_example"; # string | Optional search filter
my $since = DateTime->from_epoch(epoch => str2time('null')); # DateTime | Filter by created at after the given timestamp
my $size = 20; # int | Optional page size in list pagination
my $sort = 'ASC'; # string | Optional createdAt sort direction ASC or DESC
my $unseen_only = null; # boolean | Filter for unseen exceptions only

eval { 
    my $result = $api_instance->get_webhook_results(webhook_id => $webhook_id, before => $before, page => $page, search_filter => $search_filter, since => $since, size => $size, sort => $sort, unseen_only => $unseen_only);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_webhook_results: $@n";
}

Parameters

NameTypeDescriptionNotes
webhook_idstringID of webhook to get results for
beforeDateTimeFilter by created at before the given timestamp[optional]
pageintOptional page in list pagination[optional] [default to 0]
search_filterstringOptional search filter[optional]
sinceDateTimeFilter by created at after the given timestamp[optional]
sizeintOptional 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

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

get_webhook_results_unseen_error_count

UnseenErrorCountDto get_webhook_results_unseen_error_count(inbox_id => $inbox_id)

Get count of unseen webhook results with error status

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $inbox_id = null; # string | inboxId

eval { 
    my $result = $api_instance->get_webhook_results_unseen_error_count(inbox_id => $inbox_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_webhook_results_unseen_error_count: $@n";
}

Parameters

NameTypeDescriptionNotes
inbox_idstringinboxId

Return type

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

ARRAY[WebhookDto] get_webhooks(inbox_id => $inbox_id)

Get all webhooks for an Inbox

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $inbox_id = null; # string | inboxId

eval { 
    my $result = $api_instance->get_webhooks(inbox_id => $inbox_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->get_webhooks: $@n";
}

Parameters

NameTypeDescriptionNotes
inbox_idstringinboxId

Return type

**ARRAY[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

WebhookRedriveResult redrive_webhook_result(webhook_result_id => $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

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $webhook_result_id = null; # string | Webhook Result ID

eval { 
    my $result = $api_instance->redrive_webhook_result(webhook_result_id => $webhook_result_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->redrive_webhook_result: $@n";
}

Parameters

NameTypeDescriptionNotes
webhook_result_idstringWebhook Result ID

Return type

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

WebhookTestResult send_test_data(webhook_id => $webhook_id)

Send webhook test data

Example

use Data::Dumper;
use MailSlurp::WebhookControllerApi;
my $api_instance = MailSlurp::WebhookControllerApi->new(

    # Configure API key authorization: API_KEY
    api_key => {'x-api-key' => 'YOUR_API_KEY'},
    # uncomment below to setup prefix (e.g. Bearer) for API key, if needed
    #api_key_prefix => {'x-api-key' => 'Bearer'},
);

my $webhook_id = null; # string | webhookId

eval { 
    my $result = $api_instance->send_test_data(webhook_id => $webhook_id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WebhookControllerApi->send_test_data: $@n";
}

Parameters

NameTypeDescriptionNotes
webhook_idstringwebhookId

Return type

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 ]