mailslurp_netstandard_2x.Api.WebhookControllerApi
All URIs are relative to https://csharp.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 |
CreateWebhookForPhoneNumber | POST /phone/numbers/{phoneNumberId}/webhooks | Attach a WebHook URL to a phone number |
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 |
GetAllAccountWebhooks | GET /webhooks/account/paginated | List account webhooks Paginated |
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 | |
GetPhoneNumberWebhooksPaginated | GET /phone/numbers/{phoneId}/webhooks/paginated | Get paginated webhooks for a phone number |
GetTestWebhookPayload | GET /webhooks/test | |
GetTestWebhookPayloadBounce | GET /webhooks/test/email-bounce-payload | |
GetTestWebhookPayloadBounceRecipient | GET /webhooks/test/email-bounce-recipient-payload | |
GetTestWebhookPayloadDeliveryStatus | GET /webhooks/test/delivery-status-payload | Get webhook test payload for delivery status event |
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 |
GetTestWebhookPayloadNewSms | GET /webhooks/test/new-sms-payload | Get webhook test payload for new sms 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 |
UpdateWebhookHeaders | PUT /webhooks/{webhookId}/headers | Update a webhook request headers |
VerifyWebhookSignature | POST /webhooks/verify | Verify a webhook payload signature |
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class CreateAccountWebhookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
}
}
}
}
Using the CreateAccountWebhookWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Attach a WebHook URL to an inbox
ApiResponse<WebhookDto> response = apiInstance.CreateAccountWebhookWithHttpInfo(createWebhookOptions);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.CreateAccountWebhookWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
createWebhookOptions | CreateWebhookOptions |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class CreateWebhookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "inboxId_example"; // 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);
}
}
}
}
Using the CreateWebhookWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Attach a WebHook URL to an inbox
ApiResponse<WebhookDto> response = apiInstance.CreateWebhookWithHttpInfo(inboxId, createWebhookOptions);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.CreateWebhookWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | Guid | ||
createWebhookOptions | CreateWebhookOptions |
Return type
Authorization
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 CreateWebhookForPhoneNumber (Guid phoneNumberId, CreateWebhookOptions createWebhookOptions)
Attach a WebHook URL to a phone number
Get notified whenever a phone number receives an SMS via a WebHook URL.
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class CreateWebhookForPhoneNumberExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 phoneNumberId = "phoneNumberId_example"; // Guid |
var createWebhookOptions = new CreateWebhookOptions(); // CreateWebhookOptions |
try
{
// Attach a WebHook URL to a phone number
WebhookDto result = apiInstance.CreateWebhookForPhoneNumber(phoneNumberId, createWebhookOptions);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.CreateWebhookForPhoneNumber: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the CreateWebhookForPhoneNumberWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Attach a WebHook URL to a phone number
ApiResponse<WebhookDto> response = apiInstance.CreateWebhookForPhoneNumberWithHttpInfo(phoneNumberId, createWebhookOptions);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.CreateWebhookForPhoneNumberWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
phoneNumberId | Guid | ||
createWebhookOptions | CreateWebhookOptions |
Return type
Authorization
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 (DateTime? before = null)
Delete all webhooks
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class DeleteAllWebhooksExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | before (optional)
try
{
// Delete all webhooks
apiInstance.DeleteAllWebhooks(before);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.DeleteAllWebhooks: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the DeleteAllWebhooksWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete all webhooks
apiInstance.DeleteAllWebhooksWithHttpInfo(before);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.DeleteAllWebhooksWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
before | DateTime? | before | [optional] |
Return type
void (empty response body)
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class DeleteWebhookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "inboxId_example"; // Guid |
var webhookId = "webhookId_example"; // 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);
}
}
}
}
Using the DeleteWebhookWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete and disable a Webhook for an Inbox
apiInstance.DeleteWebhookWithHttpInfo(inboxId, webhookId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.DeleteWebhookWithHttpInfo: " + 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
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class DeleteWebhookByIdExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookId_example"; // 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);
}
}
}
}
Using the DeleteWebhookByIdWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Delete a webhook
apiInstance.DeleteWebhookByIdWithHttpInfo(webhookId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.DeleteWebhookByIdWithHttpInfo: " + 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
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 ]
PageWebhookProjection GetAllAccountWebhooks (int? page = null, int? size = null, string sort = null, string eventType = null, DateTime? since = null, DateTime? before = null)
List account webhooks Paginated
List account webhooks in paginated form. Allows for page , page size, and sort direction.
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetAllAccountWebhooksExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = 0; // int? | Optional page in list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size for paginated result list. (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to DESC)
var eventType = "EMAIL_RECEIVED"; // string | Optional event type (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
// List account webhooks Paginated
PageWebhookProjection result = apiInstance.GetAllAccountWebhooks(page, size, sort, eventType, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetAllAccountWebhooks: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetAllAccountWebhooksWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List account webhooks Paginated
ApiResponse<PageWebhookProjection> response = apiInstance.GetAllAccountWebhooksWithHttpInfo(page, size, sort, eventType, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetAllAccountWebhooksWithHttpInfo: " + 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] |
eventType | string | Optional event type | [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
Authorization
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 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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetAllWebhookResultsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = 0; // int? | Optional page in list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var searchFilter = "searchFilter_example"; // string | Optional search filter (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("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);
}
}
}
}
Using the GetAllWebhookResultsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get results for all webhooks
ApiResponse<PageWebhookResult> response = apiInstance.GetAllWebhookResultsWithHttpInfo(page, size, sort, searchFilter, since, before, unseenOnly);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetAllWebhookResultsWithHttpInfo: " + 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
Authorization
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, Guid? inboxId = null, Guid? phoneId = 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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetAllWebhooksExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = 0; // int? | Optional page in list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size for paginated result list. (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to DESC)
var searchFilter = "searchFilter_example"; // string | Optional search filter (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var inboxId = "inboxId_example"; // Guid? | Filter by inboxId (optional)
var phoneId = "phoneId_example"; // Guid? | Filter by phoneId (optional)
var before = DateTime.Parse("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, inboxId, phoneId, 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);
}
}
}
}
Using the GetAllWebhooksWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// List Webhooks Paginated
ApiResponse<PageWebhookProjection> response = apiInstance.GetAllWebhooksWithHttpInfo(page, size, sort, searchFilter, since, inboxId, phoneId, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetAllWebhooksWithHttpInfo: " + 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] |
inboxId | Guid? | Filter by inboxId | [optional] |
phoneId | Guid? | Filter by phoneId | [optional] |
before | DateTime? | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetInboxWebhooksPaginatedExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "inboxId_example"; // Guid |
var page = 0; // int? | Optional page in list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var searchFilter = "searchFilter_example"; // string | Optional search filter (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("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);
}
}
}
}
Using the GetInboxWebhooksPaginatedWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get paginated webhooks for an Inbox
ApiResponse<PageWebhookProjection> response = apiInstance.GetInboxWebhooksPaginatedWithHttpInfo(inboxId, page, size, sort, searchFilter, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetInboxWebhooksPaginatedWithHttpInfo: " + 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
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetJsonSchemaForWebhookEventExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "EMAIL_RECEIVED"; // 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);
}
}
}
}
Using the GetJsonSchemaForWebhookEventWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JSONSchemaDto> response = apiInstance.GetJsonSchemaForWebhookEventWithHttpInfo(_event);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetJsonSchemaForWebhookEventWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
_event | string |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetJsonSchemaForWebhookPayloadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookId_example"; // 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);
}
}
}
}
Using the GetJsonSchemaForWebhookPayloadWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<JSONSchemaDto> response = apiInstance.GetJsonSchemaForWebhookPayloadWithHttpInfo(webhookId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetJsonSchemaForWebhookPayloadWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | Guid |
Return type
Authorization
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 GetPhoneNumberWebhooksPaginated (Guid phoneId, int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null)
Get paginated webhooks for a phone number
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetPhoneNumberWebhooksPaginatedExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 phoneId = "phoneId_example"; // Guid |
var page = 0; // int? | Optional page in list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at before the given timestamp (optional)
try
{
// Get paginated webhooks for a phone number
PageWebhookProjection result = apiInstance.GetPhoneNumberWebhooksPaginated(phoneId, page, size, sort, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetPhoneNumberWebhooksPaginated: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetPhoneNumberWebhooksPaginatedWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get paginated webhooks for a phone number
ApiResponse<PageWebhookProjection> response = apiInstance.GetPhoneNumberWebhooksPaginatedWithHttpInfo(phoneId, page, size, sort, since, before);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetPhoneNumberWebhooksPaginatedWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
phoneId | 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] |
since | DateTime? | Filter by created at after the given timestamp | [optional] |
before | DateTime? | Filter by created at before the given timestamp | [optional] |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "EMAIL_RECEIVED"; // 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);
}
}
}
}
Using the GetTestWebhookPayloadWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AbstractWebhookPayload> response = apiInstance.GetTestWebhookPayloadWithHttpInfo(eventName);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
eventName | string | [optional] |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadBounceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
}
}
}
}
Using the GetTestWebhookPayloadBounceWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<WebhookBouncePayload> response = apiInstance.GetTestWebhookPayloadBounceWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadBounceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadBounceRecipientExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
}
}
}
}
Using the GetTestWebhookPayloadBounceRecipientWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<WebhookBounceRecipientPayload> response = apiInstance.GetTestWebhookPayloadBounceRecipientWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadBounceRecipientWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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 ]
WebhookDeliveryStatusPayload GetTestWebhookPayloadDeliveryStatus ()
Get webhook test payload for delivery status event
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadDeliveryStatusExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 delivery status event
WebhookDeliveryStatusPayload result = apiInstance.GetTestWebhookPayloadDeliveryStatus();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadDeliveryStatus: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetTestWebhookPayloadDeliveryStatusWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get webhook test payload for delivery status event
ApiResponse<WebhookDeliveryStatusPayload> response = apiInstance.GetTestWebhookPayloadDeliveryStatusWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadDeliveryStatusWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadEmailOpenedExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
}
}
}
}
Using the GetTestWebhookPayloadEmailOpenedWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<WebhookEmailOpenedPayload> response = apiInstance.GetTestWebhookPayloadEmailOpenedWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadEmailOpenedWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadEmailReadExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
}
}
}
}
Using the GetTestWebhookPayloadEmailReadWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<WebhookEmailReadPayload> response = apiInstance.GetTestWebhookPayloadEmailReadWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadEmailReadWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadForWebhookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookId_example"; // 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);
}
}
}
}
Using the GetTestWebhookPayloadForWebhookWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<AbstractWebhookPayload> response = apiInstance.GetTestWebhookPayloadForWebhookWithHttpInfo(webhookId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadForWebhookWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | Guid |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadNewAttachmentExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
}
}
}
}
Using the GetTestWebhookPayloadNewAttachmentWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get webhook test payload for new attachment event
ApiResponse<WebhookNewAttachmentPayload> response = apiInstance.GetTestWebhookPayloadNewAttachmentWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewAttachmentWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadNewContactExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
}
}
}
}
Using the GetTestWebhookPayloadNewContactWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get webhook test payload for new contact event
ApiResponse<WebhookNewContactPayload> response = apiInstance.GetTestWebhookPayloadNewContactWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewContactWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadNewEmailExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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);
}
}
}
}
Using the GetTestWebhookPayloadNewEmailWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get webhook test payload for new email event
ApiResponse<WebhookNewEmailPayload> response = apiInstance.GetTestWebhookPayloadNewEmailWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewEmailWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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 ]
WebhookNewSmsPayload GetTestWebhookPayloadNewSms ()
Get webhook test payload for new sms event
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetTestWebhookPayloadNewSmsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 sms event
WebhookNewSmsPayload result = apiInstance.GetTestWebhookPayloadNewSms();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewSms: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetTestWebhookPayloadNewSmsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get webhook test payload for new sms event
ApiResponse<WebhookNewSmsPayload> response = apiInstance.GetTestWebhookPayloadNewSmsWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetTestWebhookPayloadNewSmsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetWebhookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookId_example"; // 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);
}
}
}
}
Using the GetWebhookWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get a webhook
ApiResponse<WebhookDto> response = apiInstance.GetWebhookWithHttpInfo(webhookId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetWebhookWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | Guid |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetWebhookResultExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookResultId_example"; // 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);
}
}
}
}
Using the GetWebhookResultWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get a webhook result for a webhook
ApiResponse<WebhookResultDto> response = apiInstance.GetWebhookResultWithHttpInfo(webhookResultId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResultWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookResultId | Guid | Webhook Result ID |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetWebhookResultsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookId_example"; // Guid | ID of webhook to get results for
var page = 0; // int? | Optional page in list pagination (optional) (default to 0)
var size = 20; // int? | Optional page size in list pagination (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var searchFilter = "searchFilter_example"; // string | Optional search filter (optional)
var since = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | Filter by created at after the given timestamp (optional)
var before = DateTime.Parse("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);
}
}
}
}
Using the GetWebhookResultsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get a webhook results for a webhook
ApiResponse<PageWebhookResult> response = apiInstance.GetWebhookResultsWithHttpInfo(webhookId, page, size, sort, searchFilter, since, before, unseenOnly);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResultsWithHttpInfo: " + 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
Authorization
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 ()
Get count of unseen webhook results with error status
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetWebhookResultsUnseenErrorCountExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 count of unseen webhook results with error status
UnseenErrorCountDto result = apiInstance.GetWebhookResultsUnseenErrorCount();
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);
}
}
}
}
Using the GetWebhookResultsUnseenErrorCountWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get count of unseen webhook results with error status
ApiResponse<UnseenErrorCountDto> response = apiInstance.GetWebhookResultsUnseenErrorCountWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetWebhookResultsUnseenErrorCountWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
This endpoint does not need any parameter.
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class GetWebhooksExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "inboxId_example"; // 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);
}
}
}
}
Using the GetWebhooksWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get all webhooks for an Inbox
ApiResponse<List<WebhookDto>> response = apiInstance.GetWebhooksWithHttpInfo(inboxId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.GetWebhooksWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
inboxId | Guid |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class RedriveWebhookResultExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookResultId_example"; // 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);
}
}
}
}
Using the RedriveWebhookResultWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get a webhook result and try to resend the original webhook payload
ApiResponse<WebhookRedriveResult> response = apiInstance.RedriveWebhookResultWithHttpInfo(webhookResultId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.RedriveWebhookResultWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookResultId | Guid | Webhook Result ID |
Return type
Authorization
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_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class SendTestDataExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookId_example"; // 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);
}
}
}
}
Using the SendTestDataWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Send webhook test data
ApiResponse<WebhookTestResult> response = apiInstance.SendTestDataWithHttpInfo(webhookId);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.SendTestDataWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
webhookId | Guid |
Return type
Authorization
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 ]
WebhookDto UpdateWebhookHeaders (Guid webhookId, WebhookHeaders webhookHeaders)
Update a webhook request headers
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp_netstandard_2x.Api;
using mailslurp_netstandard_2x.Client;
using mailslurp_netstandard_2x.Model;
namespace Example
{
public class UpdateWebhookHeadersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://csharp.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 = "webhookId_example"; // Guid |
var webhookHeaders = new WebhookHeaders(); // WebhookHeaders |
try
{
// Update a webhook request headers
WebhookDto result = apiInstance.UpdateWebhookHeaders(webhookId, webhookHeaders);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.UpdateWebhookHeaders: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the UpdateWebhookHeadersWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Update a webhook request headers
ApiResponse<WebhookDto> response = apiInstance.UpdateWebhookHeadersWithHttpInfo(webhookId, webhookHeaders);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling WebhookControllerApi.UpdateWebhookHeadersWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}