mailslurp.Api.BounceControllerApi
All URIs are relative to https://csharp.api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
FilterBouncedRecipient | POST /bounce/filter-recipients | Filter a list of email recipients and remove those who have bounced |
GetBouncedEmail | GET /bounce/emails/{id} | Get a bounced email. |
GetBouncedEmails | GET /bounce/emails | Get paginated list of bounced emails. |
GetBouncedRecipient | GET /bounce/recipients/{id} | Get a bounced email. |
GetBouncedRecipients | GET /bounce/recipients | Get paginated list of bounced recipients. |
GetComplaints | GET /bounce/complaints | Get paginated list of complaints. |
GetListUnsubscribeRecipients | GET /bounce/list-unsubscribe-recipients | Get paginated list of unsubscribed recipients. |
FilterBouncedRecipientsResult FilterBouncedRecipient (FilterBouncedRecipientsOptions filterBouncedRecipientsOptions)
Filter a list of email recipients and remove those who have bounced
Prevent email sending errors by remove recipients who have resulted in past email bounces or complaints
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class FilterBouncedRecipientExample
{
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 BounceControllerApi(config);
var filterBouncedRecipientsOptions = new FilterBouncedRecipientsOptions(); // FilterBouncedRecipientsOptions |
try
{
// Filter a list of email recipients and remove those who have bounced
FilterBouncedRecipientsResult result = apiInstance.FilterBouncedRecipient(filterBouncedRecipientsOptions);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BounceControllerApi.FilterBouncedRecipient: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the FilterBouncedRecipientWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Filter a list of email recipients and remove those who have bounced
ApiResponse<FilterBouncedRecipientsResult> response = apiInstance.FilterBouncedRecipientWithHttpInfo(filterBouncedRecipientsOptions);
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 BounceControllerApi.FilterBouncedRecipientWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
filterBouncedRecipientsOptions | FilterBouncedRecipientsOptions |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: /
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]
BouncedEmailDto GetBouncedEmail (Guid id)
Get a bounced email.
Bounced emails are email you have sent that were rejected by a recipient
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetBouncedEmailExample
{
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 BounceControllerApi(config);
var id = "id_example"; // Guid | ID of the bounced email to fetch
try
{
// Get a bounced email.
BouncedEmailDto result = apiInstance.GetBouncedEmail(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BounceControllerApi.GetBouncedEmail: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetBouncedEmailWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get a bounced email.
ApiResponse<BouncedEmailDto> response = apiInstance.GetBouncedEmailWithHttpInfo(id);
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 BounceControllerApi.GetBouncedEmailWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid | ID of the bounced email to fetch |
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 ]
PageBouncedEmail GetBouncedEmails (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null)
Get paginated list of bounced emails.
Bounced emails are email you have sent that were rejected by a recipient
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetBouncedEmailsExample
{
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 BounceControllerApi(config);
var page = 0; // int? | Optional page (optional) (default to 0)
var size = 20; // int? | Optional page size (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 list of bounced emails.
PageBouncedEmail result = apiInstance.GetBouncedEmails(page, size, sort, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BounceControllerApi.GetBouncedEmails: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetBouncedEmailsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get paginated list of bounced emails.
ApiResponse<PageBouncedEmail> response = apiInstance.GetBouncedEmailsWithHttpInfo(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 BounceControllerApi.GetBouncedEmailsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | int? | Optional page | [optional] [default to 0] |
size | int? | Optional page size | [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 ]
BouncedRecipientDto GetBouncedRecipient (Guid id)
Get a bounced email.
Bounced emails are email you have sent that were rejected by a recipient
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetBouncedRecipientExample
{
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 BounceControllerApi(config);
var id = "id_example"; // Guid | ID of the bounced recipient
try
{
// Get a bounced email.
BouncedRecipientDto result = apiInstance.GetBouncedRecipient(id);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BounceControllerApi.GetBouncedRecipient: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetBouncedRecipientWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get a bounced email.
ApiResponse<BouncedRecipientDto> response = apiInstance.GetBouncedRecipientWithHttpInfo(id);
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 BounceControllerApi.GetBouncedRecipientWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
id | Guid | ID of the bounced recipient |
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 ]
PageBouncedRecipients GetBouncedRecipients (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null)
Get paginated list of bounced recipients.
Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address.
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetBouncedRecipientsExample
{
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 BounceControllerApi(config);
var page = 0; // int? | Optional page (optional) (default to 0)
var size = 20; // int? | Optional page size (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 list of bounced recipients.
PageBouncedRecipients result = apiInstance.GetBouncedRecipients(page, size, sort, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BounceControllerApi.GetBouncedRecipients: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetBouncedRecipientsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get paginated list of bounced recipients.
ApiResponse<PageBouncedRecipients> response = apiInstance.GetBouncedRecipientsWithHttpInfo(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 BounceControllerApi.GetBouncedRecipientsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | int? | Optional page | [optional] [default to 0] |
size | int? | Optional page size | [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 ]
PageComplaint GetComplaints (int? page = null, int? size = null, string sort = null, DateTime? since = null, DateTime? before = null)
Get paginated list of complaints.
SMTP complaints made against your account
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetComplaintsExample
{
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 BounceControllerApi(config);
var page = 0; // int? | Optional page (optional) (default to 0)
var size = 20; // int? | Optional page size (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 list of complaints.
PageComplaint result = apiInstance.GetComplaints(page, size, sort, since, before);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BounceControllerApi.GetComplaints: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetComplaintsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get paginated list of complaints.
ApiResponse<PageComplaint> response = apiInstance.GetComplaintsWithHttpInfo(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 BounceControllerApi.GetComplaintsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | int? | Optional page | [optional] [default to 0] |
size | int? | Optional page size | [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 ]
PageListUnsubscribeRecipients GetListUnsubscribeRecipients (int? page = null, int? size = null, string sort = null, Guid? domainId = null)
Get paginated list of unsubscribed recipients.
Unsubscribed recipient have unsubscribed from a mailing list for a user or domain and cannot be contacted again.
Example
using System.Collections.Generic;
using System.Diagnostics;
using mailslurp.Api;
using mailslurp.Client;
using mailslurp.Model;
namespace Example
{
public class GetListUnsubscribeRecipientsExample
{
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 BounceControllerApi(config);
var page = 0; // int? | Optional page (optional) (default to 0)
var size = 20; // int? | Optional page size (optional) (default to 20)
var sort = "ASC"; // string | Optional createdAt sort direction ASC or DESC (optional) (default to ASC)
var domainId = "domainId_example"; // Guid? | Filter by domainId (optional)
try
{
// Get paginated list of unsubscribed recipients.
PageListUnsubscribeRecipients result = apiInstance.GetListUnsubscribeRecipients(page, size, sort, domainId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BounceControllerApi.GetListUnsubscribeRecipients: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the GetListUnsubscribeRecipientsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Get paginated list of unsubscribed recipients.
ApiResponse<PageListUnsubscribeRecipients> response = apiInstance.GetListUnsubscribeRecipientsWithHttpInfo(page, size, sort, domainId);
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 BounceControllerApi.GetListUnsubscribeRecipientsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
page | int? | Optional page | [optional] [default to 0] |
size | int? | Optional page size | [optional] [default to 20] |
sort | string | Optional createdAt sort direction ASC or DESC | [optional] [default to ASC] |
domainId | Guid? | Filter by domainId | [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 ]