mailslurp_netstandard_2x.Api.BulkActionsControllerApi
All URIs are relative to https://csharp.api.mailslurp.com
Method | HTTP request | Description |
---|---|---|
BulkCreateInboxes | POST /bulk/inboxes | Bulk create Inboxes (email addresses) |
BulkDeleteInboxes | DELETE /bulk/inboxes | Bulk Delete Inboxes |
BulkSendEmails | POST /bulk/send | Bulk Send Emails |
List
BulkCreateInboxes (int count)
Bulk create Inboxes (email addresses)
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 BulkCreateInboxesExample
{
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 BulkActionsControllerApi(config);
var count = 56; // int | Number of inboxes to be created in bulk
try
{
// Bulk create Inboxes (email addresses)
List<InboxDto> result = apiInstance.BulkCreateInboxes(count);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BulkActionsControllerApi.BulkCreateInboxes: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the BulkCreateInboxesWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Bulk create Inboxes (email addresses)
ApiResponse<List<InboxDto>> response = apiInstance.BulkCreateInboxesWithHttpInfo(count);
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 BulkActionsControllerApi.BulkCreateInboxesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
count | int | Number of inboxes to be created in bulk |
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 ]
void BulkDeleteInboxes (List
requestBody)
Bulk Delete Inboxes
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 BulkDeleteInboxesExample
{
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 BulkActionsControllerApi(config);
var requestBody = new List<Guid>(); // List<Guid> |
try
{
// Bulk Delete Inboxes
apiInstance.BulkDeleteInboxes(requestBody);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BulkActionsControllerApi.BulkDeleteInboxes: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the BulkDeleteInboxesWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Bulk Delete Inboxes
apiInstance.BulkDeleteInboxesWithHttpInfo(requestBody);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BulkActionsControllerApi.BulkDeleteInboxesWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
requestBody | List |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- 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 BulkSendEmails (BulkSendEmailOptions bulkSendEmailOptions)
Bulk Send Emails
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 BulkSendEmailsExample
{
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 BulkActionsControllerApi(config);
var bulkSendEmailOptions = new BulkSendEmailOptions(); // BulkSendEmailOptions |
try
{
// Bulk Send Emails
apiInstance.BulkSendEmails(bulkSendEmailOptions);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BulkActionsControllerApi.BulkSendEmails: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the BulkSendEmailsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Bulk Send Emails
apiInstance.BulkSendEmailsWithHttpInfo(bulkSendEmailOptions);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BulkActionsControllerApi.BulkSendEmailsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Name | Type | Description | Notes |
---|---|---|---|
bulkSendEmailOptions | BulkSendEmailOptions |
Return type
void (empty response body)
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
201 | Created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to ]