All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
CreateEmailCampaign | POST /emailCampaigns | Create an email campaign |
DeleteEmailCampaign | DELETE /emailCampaigns/{campaignId} | Delete an email campaign |
EmailExportRecipients | POST /emailCampaigns/{campaignId}/exportRecipients | Export the recipients of an email campaign |
GetAbTestCampaignResult | GET /emailCampaigns/{campaignId}/abTestCampaignResult | Get an A/B test email campaign results |
GetEmailCampaign | GET /emailCampaigns/{campaignId} | Get an email campaign report |
GetEmailCampaigns | GET /emailCampaigns | Return all your created email campaigns |
GetSharedTemplateUrl | GET /emailCampaigns/{campaignId}/sharedUrl | Get a shared template url |
SendEmailCampaignNow | POST /emailCampaigns/{campaignId}/sendNow | Send an email campaign immediately, based on campaignId |
SendReport | POST /emailCampaigns/{campaignId}/sendReport | Send the report of a campaign |
SendTestEmail | POST /emailCampaigns/{campaignId}/sendTest | Send an email campaign to your test list |
UpdateCampaignStatus | PUT /emailCampaigns/{campaignId}/status | Update an email campaign status |
UpdateEmailCampaign | PUT /emailCampaigns/{campaignId} | Update an email campaign |
UploadImageToGallery | POST /emailCampaigns/images | Upload an image to your account's image gallery |
CreateModel CreateEmailCampaign (CreateEmailCampaign emailCampaigns)
Create an email campaign
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class CreateEmailCampaignExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var emailCampaigns = new CreateEmailCampaign(); // CreateEmailCampaign | Values to create a campaign
try
{
// Create an email campaign
CreateModel result = apiInstance.CreateEmailCampaign(emailCampaigns);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.CreateEmailCampaign: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
emailCampaigns | CreateEmailCampaign | Values to create a campaign |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteEmailCampaign (long? campaignId)
Delete an email campaign
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class DeleteEmailCampaignExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | id of the campaign
try
{
// Delete an email campaign
apiInstance.DeleteEmailCampaign(campaignId);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.DeleteEmailCampaign: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | id of the campaign |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedProcessId EmailExportRecipients (long? campaignId, EmailExportRecipients recipientExport = null)
Export the recipients of an email campaign
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class EmailExportRecipientsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the campaign
var recipientExport = new EmailExportRecipients(); // EmailExportRecipients | Values to send for a recipient export request (optional)
try
{
// Export the recipients of an email campaign
CreatedProcessId result = apiInstance.EmailExportRecipients(campaignId, recipientExport);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.EmailExportRecipients: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the campaign | |
recipientExport | EmailExportRecipients | Values to send for a recipient export request | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AbTestCampaignResult GetAbTestCampaignResult (long? campaignId)
Get an A/B test email campaign results
Obtain winning version of an A/B test email campaign
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class GetAbTestCampaignResultExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the A/B test campaign
try
{
// Get an A/B test email campaign results
AbTestCampaignResult result = apiInstance.GetAbTestCampaignResult(campaignId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.GetAbTestCampaignResult: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the A/B test campaign |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEmailCampaign GetEmailCampaign (long? campaignId, string statistics = null)
Get an email campaign report
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class GetEmailCampaignExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the campaign
var statistics = statistics_example; // string | Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional)
try
{
// Get an email campaign report
GetEmailCampaign result = apiInstance.GetEmailCampaign(campaignId, statistics);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.GetEmailCampaign: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the campaign | |
statistics | string | Filter on the type of statistics required. Example globalStats value will only fetch globalStats info of the campaign in returned response. | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetEmailCampaigns GetEmailCampaigns (string type = null, string status = null, string statistics = null, string startDate = null, string endDate = null, long? limit = null, long? offset = null, string sort = null)
Return all your created email campaigns
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class GetEmailCampaignsExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var type = type_example; // string | Filter on the type of the campaigns (optional)
var status = status_example; // string | Filter on the status of the campaign (optional)
var statistics = statistics_example; // string | Filter on the type of statistics required. Example **globalStats** value will only fetch globalStats info of the campaign in returned response. (optional)
var startDate = startDate_example; // string | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional)
var endDate = endDate_example; // string | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) (optional)
var limit = 789; // long? | Number of documents per page (optional) (default to 50)
var offset = 789; // long? | Index of the first document in the page (optional) (default to 0)
var sort = sort_example; // string | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed (optional) (default to desc)
try
{
// Return all your created email campaigns
GetEmailCampaigns result = apiInstance.GetEmailCampaigns(type, status, statistics, startDate, endDate, limit, offset, sort);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.GetEmailCampaigns: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
type | string | Filter on the type of the campaigns | [optional] |
status | string | Filter on the status of the campaign | [optional] |
statistics | string | Filter on the type of statistics required. Example globalStats value will only fetch globalStats info of the campaign in returned response. | [optional] |
startDate | string | Mandatory if endDate is used. Starting (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] |
endDate | string | Mandatory if startDate is used. Ending (urlencoded) UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) to filter the sent email campaigns. Prefer to pass your timezone in date-time format for accurate result ( only available if either 'status' not passed and if passed is set to 'sent' ) | [optional] |
limit | long? | Number of documents per page | [optional] [default to 50] |
offset | long? | Index of the first document in the page | [optional] [default to 0] |
sort | string | Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [optional] [default to desc] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSharedTemplateUrl GetSharedTemplateUrl (long? campaignId)
Get a shared template url
Get a unique URL to share & import an email template from one Sendinblue account to another.
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class GetSharedTemplateUrlExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the campaign or template
try
{
// Get a shared template url
GetSharedTemplateUrl result = apiInstance.GetSharedTemplateUrl(campaignId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.GetSharedTemplateUrl: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the campaign or template |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void SendEmailCampaignNow (long? campaignId)
Send an email campaign immediately, based on campaignId
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class SendEmailCampaignNowExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the campaign
try
{
// Send an email campaign immediately, based on campaignId
apiInstance.SendEmailCampaignNow(campaignId);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.SendEmailCampaignNow: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the campaign |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void SendReport (long? campaignId, SendReport sendReport)
Send the report of a campaign
A PDF will be sent to the specified email addresses
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class SendReportExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the campaign
var sendReport = new SendReport(); // SendReport | Values for send a report
try
{
// Send the report of a campaign
apiInstance.SendReport(campaignId, sendReport);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.SendReport: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the campaign | |
sendReport | SendReport | Values for send a report |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void SendTestEmail (long? campaignId, SendTestEmail emailTo)
Send an email campaign to your test list
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class SendTestEmailExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the campaign
var emailTo = new SendTestEmail(); // SendTestEmail |
try
{
// Send an email campaign to your test list
apiInstance.SendTestEmail(campaignId, emailTo);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.SendTestEmail: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the campaign | |
emailTo | SendTestEmail |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateCampaignStatus (long? campaignId, UpdateCampaignStatus status)
Update an email campaign status
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class UpdateCampaignStatusExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the campaign
var status = new UpdateCampaignStatus(); // UpdateCampaignStatus | Status of the campaign
try
{
// Update an email campaign status
apiInstance.UpdateCampaignStatus(campaignId, status);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.UpdateCampaignStatus: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the campaign | |
status | UpdateCampaignStatus | Status of the campaign |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void UpdateEmailCampaign (long? campaignId, UpdateEmailCampaign emailCampaign)
Update an email campaign
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class UpdateEmailCampaignExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var campaignId = 789; // long? | Id of the campaign
var emailCampaign = new UpdateEmailCampaign(); // UpdateEmailCampaign | Values to update a campaign
try
{
// Update an email campaign
apiInstance.UpdateEmailCampaign(campaignId, emailCampaign);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.UpdateEmailCampaign: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
campaignId | long? | Id of the campaign | |
emailCampaign | UpdateEmailCampaign | Values to update a campaign |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadImageModel UploadImageToGallery (UploadImageToGallery uploadImage)
Upload an image to your account's image gallery
using System;
using System.Diagnostics;
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;
namespace Example
{
public class UploadImageToGalleryExample
{
public void main()
{
// Configure API key authorization: api-key
Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
// Configure API key authorization: partner-key
Configuration.Default.AddApiKey("partner-key", "YOUR_PARTNER_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("partner-key", "Bearer");
var apiInstance = new EmailCampaignsApi();
var uploadImage = new UploadImageToGallery(); // UploadImageToGallery | Parameters to upload an image
try
{
// Upload an image to your account's image gallery
UploadImageModel result = apiInstance.UploadImageToGallery(uploadImage);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EmailCampaignsApi.UploadImageToGallery: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
uploadImage | UploadImageToGallery | Parameters to upload an image |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]