Skip to content

mailslurp.Api.WebhookControllerApi

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

Method HTTP request Description
CreateAccountWebhook POST /webhooks Attach a WebHook URL to an inbox
CreateWebhook POST /inboxes/{inboxId}/webhooks Attach a WebHook URL to an inbox
DeleteAllWebhooks DELETE /webhooks Delete all webhooks
DeleteWebhook DELETE /inboxes/{inboxId}/webhooks/{webhookId} Delete and disable a Webhook for an Inbox
DeleteWebhookById DELETE /webhooks/{webhookId} Delete a webhook
GetAllWebhookResults GET /webhooks/results Get results for all webhooks
GetAllWebhooks GET /webhooks/paginated List Webhooks Paginated
GetInboxWebhooksPaginated GET /inboxes/{inboxId}/webhooks/paginated Get paginated webhooks for an Inbox
GetJsonSchemaForWebhookEvent POST /webhooks/schema
GetJsonSchemaForWebhookPayload POST /webhooks/{webhookId}/schema
GetTestWebhookPayload GET /webhooks/test
GetTestWebhookPayloadBounce GET /webhooks/test/email-bounce-payload
GetTestWebhookPayloadBounceRecipient GET /webhooks/test/email-bounce-recipient-payload
GetTestWebhookPayloadEmailOpened GET /webhooks/test/email-opened-payload
GetTestWebhookPayloadEmailRead GET /webhooks/test/email-read-payload
GetTestWebhookPayloadForWebhook POST /webhooks/{webhookId}/example
GetTestWebhookPayloadNewAttachment GET /webhooks/test/new-attachment-payload Get webhook test payload for new attachment event
GetTestWebhookPayloadNewContact GET /webhooks/test/new-contact-payload Get webhook test payload for new contact event
GetTestWebhookPayloadNewEmail GET /webhooks/test/new-email-payload Get webhook test payload for new email event
GetWebhook GET /webhooks/{webhookId} Get a webhook
GetWebhookResult GET /webhooks/results/{webhookResultId} Get a webhook result for a webhook
GetWebhookResults GET /webhooks/{webhookId}/results Get a webhook results for a webhook
GetWebhookResultsUnseenErrorCount GET /webhooks/results/unseen-count Get count of unseen webhook results with error status
GetWebhooks GET /inboxes/{inboxId}/webhooks Get all webhooks for an Inbox
RedriveWebhookResult POST /webhooks/results/{webhookResultId}/redrive Get a webhook result and try to resend the original webhook payload
SendTestData POST /webhooks/{webhookId}/test Send webhook test data

WebhookDto CreateAccountWebhook (CreateWebhookOptions createWebhookOptions)

Attach a WebHook URL to an inbox

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class CreateAccountWebhookExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var createWebhookOptions = new CreateWebhookOptions(); // CreateWebhookOptions | 

            try
            {
                // Attach a WebHook URL to an inbox
                WebhookDto result = apiInstance.CreateAccountWebhook(createWebhookOptions);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.CreateAccountWebhook: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
createWebhookOptions CreateWebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -

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

WebhookDto CreateWebhook (Guid inboxId, CreateWebhookOptions createWebhookOptions)

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

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class CreateWebhookExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var inboxId = new Guid(); // Guid | 
            var createWebhookOptions = new CreateWebhookOptions(); // CreateWebhookOptions | 

            try
            {
                // Attach a WebHook URL to an inbox
                WebhookDto result = apiInstance.CreateWebhook(inboxId, createWebhookOptions);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.CreateWebhook: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
inboxId Guid
createWebhookOptions CreateWebhookOptions

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -

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

void DeleteAllWebhooks ()

Delete all webhooks

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class DeleteAllWebhooksExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);

            try
            {
                // Delete all webhooks
                apiInstance.DeleteAllWebhooks();
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.DeleteAllWebhooks: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

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

HTTP response details

Status code Description Response headers
204 No Content -

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

void DeleteWebhook (Guid inboxId, Guid webhookId)

Delete and disable a Webhook for an Inbox

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class DeleteWebhookExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var inboxId = new Guid(); // Guid | 
            var webhookId = new Guid(); // Guid | 

            try
            {
                // Delete and disable a Webhook for an Inbox
                apiInstance.DeleteWebhook(inboxId, webhookId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.DeleteWebhook: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
inboxId Guid
webhookId Guid

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -

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

void DeleteWebhookById (Guid webhookId)

Delete a webhook

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class DeleteWebhookByIdExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var webhookId = new Guid(); // Guid | 

            try
            {
                // Delete a webhook
                apiInstance.DeleteWebhookById(webhookId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.DeleteWebhookById: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId Guid

Return type

void (empty response body)

Authorization

API_KEY

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -

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

PageWebhookResult GetAllWebhookResults (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, bool? unseenOnly = null)

Get results for all webhooks

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetAllWebhookResultsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var page = 56;  // int? | Optional page  in list pagination (optional)  (default to 0)
            var size = 56;  // int? | Optional page size in list pagination (optional)  (default to 20)
            var sort = sort_example;  // string | Optional createdAt sort direction ASC or DESC (optional)  (default to ASC)
            var searchFilter = searchFilter_example;  // string | Optional search filter (optional) 
            var since = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at after the given timestamp (optional) 
            var before = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at before the given timestamp (optional) 
            var unseenOnly = true;  // bool? | Filter for unseen exceptions only (optional) 

            try
            {
                // Get results for all webhooks
                PageWebhookResult result = apiInstance.GetAllWebhookResults(page, size, sort, searchFilter, since, before, unseenOnly);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetAllWebhookResults: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
page int? Optional page in list pagination [optional] [default to 0]
size int? Optional page size in list pagination [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to ASC]
searchFilter string Optional search filter [optional]
since DateTime? Filter by created at after the given timestamp [optional]
before DateTime? Filter by created at before the given timestamp [optional]
unseenOnly bool? Filter for unseen exceptions only [optional]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

PageWebhookProjection GetAllWebhooks (int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null)

List Webhooks Paginated

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetAllWebhooksExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var page = 56;  // int? | Optional page  in list pagination (optional)  (default to 0)
            var size = 56;  // int? | Optional page size for paginated result list. (optional)  (default to 20)
            var sort = sort_example;  // string | Optional createdAt sort direction ASC or DESC (optional)  (default to DESC)
            var searchFilter = searchFilter_example;  // string | Optional search filter (optional) 
            var since = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at after the given timestamp (optional) 
            var before = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at before the given timestamp (optional) 

            try
            {
                // List Webhooks Paginated
                PageWebhookProjection result = apiInstance.GetAllWebhooks(page, size, sort, searchFilter, since, before);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetAllWebhooks: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
page int? Optional page in list pagination [optional] [default to 0]
size int? Optional page size for paginated result list. [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to DESC]
searchFilter string Optional search filter [optional]
since DateTime? Filter by created at after the given timestamp [optional]
before DateTime? Filter by created at before the given timestamp [optional]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

PageWebhookProjection GetInboxWebhooksPaginated (Guid inboxId, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null)

Get paginated webhooks for an Inbox

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetInboxWebhooksPaginatedExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var inboxId = new Guid(); // Guid | 
            var page = 56;  // int? | Optional page  in list pagination (optional)  (default to 0)
            var size = 56;  // int? | Optional page size in list pagination (optional)  (default to 20)
            var sort = sort_example;  // string | Optional createdAt sort direction ASC or DESC (optional)  (default to ASC)
            var searchFilter = searchFilter_example;  // string | Optional search filter (optional) 
            var since = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at after the given timestamp (optional) 
            var before = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at before the given timestamp (optional) 

            try
            {
                // Get paginated webhooks for an Inbox
                PageWebhookProjection result = apiInstance.GetInboxWebhooksPaginated(inboxId, page, size, sort, searchFilter, since, before);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetInboxWebhooksPaginated: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
inboxId Guid
page int? Optional page in list pagination [optional] [default to 0]
size int? Optional page size in list pagination [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to ASC]
searchFilter string Optional search filter [optional]
since DateTime? Filter by created at after the given timestamp [optional]
before DateTime? Filter by created at before the given timestamp [optional]

Return type

PageWebhookProjection

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

JSONSchemaDto GetJsonSchemaForWebhookEvent (string _event)

Get JSON Schema definition for webhook payload by event

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetJsonSchemaForWebhookEventExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var _event = _event_example;  // string | 

            try
            {
                JSONSchemaDto result = apiInstance.GetJsonSchemaForWebhookEvent(_event);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetJsonSchemaForWebhookEvent: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
_event string

Return type

JSONSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

JSONSchemaDto GetJsonSchemaForWebhookPayload (Guid webhookId)

Get JSON Schema definition for webhook payload

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetJsonSchemaForWebhookPayloadExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var webhookId = new Guid(); // Guid | 

            try
            {
                JSONSchemaDto result = apiInstance.GetJsonSchemaForWebhookPayload(webhookId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetJsonSchemaForWebhookPayload: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId Guid

Return type

JSONSchemaDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

AbstractWebhookPayload GetTestWebhookPayload (string eventName = null)

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var eventName = eventName_example;  // string |  (optional) 

            try
            {
                AbstractWebhookPayload result = apiInstance.GetTestWebhookPayload(eventName);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayload: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
eventName string [optional]

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookBouncePayload GetTestWebhookPayloadBounce ()

Get webhook test payload for bounce

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadBounceExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);

            try
            {
                WebhookBouncePayload result = apiInstance.GetTestWebhookPayloadBounce();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadBounce: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookBouncePayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookBounceRecipientPayload GetTestWebhookPayloadBounceRecipient ()

Get webhook test payload for bounce recipient

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadBounceRecipientExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);

            try
            {
                WebhookBounceRecipientPayload result = apiInstance.GetTestWebhookPayloadBounceRecipient();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadBounceRecipient: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookBounceRecipientPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookEmailOpenedPayload GetTestWebhookPayloadEmailOpened ()

Get webhook test payload for email opened event

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadEmailOpenedExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);

            try
            {
                WebhookEmailOpenedPayload result = apiInstance.GetTestWebhookPayloadEmailOpened();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadEmailOpened: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailOpenedPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookEmailReadPayload GetTestWebhookPayloadEmailRead ()

Get webhook test payload for email opened event

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadEmailReadExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);

            try
            {
                WebhookEmailReadPayload result = apiInstance.GetTestWebhookPayloadEmailRead();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadEmailRead: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookEmailReadPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

AbstractWebhookPayload GetTestWebhookPayloadForWebhook (Guid webhookId)

Get example payload for webhook

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadForWebhookExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var webhookId = new Guid(); // Guid | 

            try
            {
                AbstractWebhookPayload result = apiInstance.GetTestWebhookPayloadForWebhook(webhookId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadForWebhook: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId Guid

Return type

AbstractWebhookPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
201 Created -

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

WebhookNewAttachmentPayload GetTestWebhookPayloadNewAttachment ()

Get webhook test payload for new attachment event

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadNewAttachmentExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);

            try
            {
                // Get webhook test payload for new attachment event
                WebhookNewAttachmentPayload result = apiInstance.GetTestWebhookPayloadNewAttachment();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewAttachment: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewAttachmentPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookNewContactPayload GetTestWebhookPayloadNewContact ()

Get webhook test payload for new contact event

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadNewContactExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);

            try
            {
                // Get webhook test payload for new contact event
                WebhookNewContactPayload result = apiInstance.GetTestWebhookPayloadNewContact();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewContact: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewContactPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookNewEmailPayload GetTestWebhookPayloadNewEmail ()

Get webhook test payload for new email event

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetTestWebhookPayloadNewEmailExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);

            try
            {
                // Get webhook test payload for new email event
                WebhookNewEmailPayload result = apiInstance.GetTestWebhookPayloadNewEmail();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewEmail: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

WebhookNewEmailPayload

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookDto GetWebhook (Guid webhookId)

Get a webhook

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetWebhookExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var webhookId = new Guid(); // Guid | 

            try
            {
                // Get a webhook
                WebhookDto result = apiInstance.GetWebhook(webhookId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetWebhook: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId Guid

Return type

WebhookDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookResultDto GetWebhookResult (Guid webhookResultId)

Get a webhook result for a webhook

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetWebhookResultExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var webhookResultId = new Guid(); // Guid | Webhook Result ID

            try
            {
                // Get a webhook result for a webhook
                WebhookResultDto result = apiInstance.GetWebhookResult(webhookResultId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResult: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookResultId Guid Webhook Result ID

Return type

WebhookResultDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

PageWebhookResult GetWebhookResults (Guid webhookId, int? page = null, int? size = null, string sort = null, string searchFilter = null, DateTime? since = null, DateTime? before = null, bool? unseenOnly = null)

Get a webhook results for a webhook

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetWebhookResultsExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var webhookId = new Guid(); // Guid | ID of webhook to get results for
            var page = 56;  // int? | Optional page  in list pagination (optional)  (default to 0)
            var size = 56;  // int? | Optional page size in list pagination (optional)  (default to 20)
            var sort = sort_example;  // string | Optional createdAt sort direction ASC or DESC (optional)  (default to ASC)
            var searchFilter = searchFilter_example;  // string | Optional search filter (optional) 
            var since = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at after the given timestamp (optional) 
            var before = 2013-10-20T19:20:30+01:00;  // DateTime? | Filter by created at before the given timestamp (optional) 
            var unseenOnly = true;  // bool? | Filter for unseen exceptions only (optional) 

            try
            {
                // Get a webhook results for a webhook
                PageWebhookResult result = apiInstance.GetWebhookResults(webhookId, page, size, sort, searchFilter, since, before, unseenOnly);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResults: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId Guid ID of webhook to get results for
page int? Optional page in list pagination [optional] [default to 0]
size int? Optional page size in list pagination [optional] [default to 20]
sort string Optional createdAt sort direction ASC or DESC [optional] [default to ASC]
searchFilter string Optional search filter [optional]
since DateTime? Filter by created at after the given timestamp [optional]
before DateTime? Filter by created at before the given timestamp [optional]
unseenOnly bool? Filter for unseen exceptions only [optional]

Return type

PageWebhookResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

UnseenErrorCountDto GetWebhookResultsUnseenErrorCount (Guid inboxId)

Get count of unseen webhook results with error status

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetWebhookResultsUnseenErrorCountExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var inboxId = new Guid(); // Guid | 

            try
            {
                // Get count of unseen webhook results with error status
                UnseenErrorCountDto result = apiInstance.GetWebhookResultsUnseenErrorCount(inboxId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResultsUnseenErrorCount: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
inboxId Guid

Return type

UnseenErrorCountDto

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

List GetWebhooks (Guid inboxId)

Get all webhooks for an Inbox

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class GetWebhooksExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var inboxId = new Guid(); // Guid | 

            try
            {
                // Get all webhooks for an Inbox
                List<WebhookDto> result = apiInstance.GetWebhooks(inboxId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.GetWebhooks: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
inboxId Guid

Return type

List

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookRedriveResult RedriveWebhookResult (Guid webhookResultId)

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

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class RedriveWebhookResultExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var webhookResultId = new Guid(); // Guid | Webhook Result ID

            try
            {
                // Get a webhook result and try to resend the original webhook payload
                WebhookRedriveResult result = apiInstance.RedriveWebhookResult(webhookResultId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.RedriveWebhookResult: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookResultId Guid Webhook Result ID

Return type

WebhookRedriveResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
200 OK -

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

WebhookTestResult SendTestData (Guid webhookId)

Send webhook test data

Example

using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;

namespace Example
{
    public class SendTestDataExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.mailslurp.com";
            // Configure API key authorization: API_KEY
            config.AddApiKey("x-api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // config.AddApiKeyPrefix("x-api-key", "Bearer");

            var apiInstance = new WebhookControllerApi(config);
            var webhookId = new Guid(); // Guid | 

            try
            {
                // Send webhook test data
                WebhookTestResult result = apiInstance.SendTestData(webhookId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WebhookControllerApi.SendTestData: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
webhookId Guid

Return type

WebhookTestResult

Authorization

API_KEY

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

HTTP response details

Status code Description Response headers
201 Created -

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