Skip to content

Latest commit

 

History

History
931 lines (729 loc) · 33.6 KB

EmailCampaignsApi.md

File metadata and controls

931 lines (729 loc) · 33.6 KB

sib_api_v3_sdk.Api.EmailCampaignsApi

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

CreateEmailCampaign

CreateModel CreateEmailCampaign (CreateEmailCampaign emailCampaigns)

Create an email campaign

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
emailCampaigns CreateEmailCampaign Values to create a campaign

Return type

CreateModel

Authorization

api-key, partner-key

HTTP request headers

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

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

DeleteEmailCampaign

void DeleteEmailCampaign (long? campaignId)

Delete an email campaign

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? id of the campaign

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

EmailExportRecipients

CreatedProcessId EmailExportRecipients (long? campaignId, EmailExportRecipients recipientExport = null)

Export the recipients of an email campaign

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? Id of the campaign
recipientExport EmailExportRecipients Values to send for a recipient export request [optional]

Return type

CreatedProcessId

Authorization

api-key, partner-key

HTTP request headers

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

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

GetAbTestCampaignResult

AbTestCampaignResult GetAbTestCampaignResult (long? campaignId)

Get an A/B test email campaign results

Obtain winning version of an A/B test email campaign

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? Id of the A/B test campaign

Return type

AbTestCampaignResult

Authorization

api-key, partner-key

HTTP request headers

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

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

GetEmailCampaign

GetEmailCampaign GetEmailCampaign (long? campaignId, string statistics = null)

Get an email campaign report

Example

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 );
            }
        }
    }
}

Parameters

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]

Return type

GetEmailCampaign

Authorization

api-key, partner-key

HTTP request headers

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

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

GetEmailCampaigns

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

Example

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 );
            }
        }
    }
}

Parameters

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]

Return type

GetEmailCampaigns

Authorization

api-key, partner-key

HTTP request headers

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

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

GetSharedTemplateUrl

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.

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? Id of the campaign or template

Return type

GetSharedTemplateUrl

Authorization

api-key, partner-key

HTTP request headers

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

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

SendEmailCampaignNow

void SendEmailCampaignNow (long? campaignId)

Send an email campaign immediately, based on campaignId

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? Id of the campaign

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

SendReport

void SendReport (long? campaignId, SendReport sendReport)

Send the report of a campaign

A PDF will be sent to the specified email addresses

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? Id of the campaign
sendReport SendReport Values for send a report

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

SendTestEmail

void SendTestEmail (long? campaignId, SendTestEmail emailTo)

Send an email campaign to your test list

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? Id of the campaign
emailTo SendTestEmail

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

UpdateCampaignStatus

void UpdateCampaignStatus (long? campaignId, UpdateCampaignStatus status)

Update an email campaign status

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? Id of the campaign
status UpdateCampaignStatus Status of the campaign

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

UpdateEmailCampaign

void UpdateEmailCampaign (long? campaignId, UpdateEmailCampaign emailCampaign)

Update an email campaign

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
campaignId long? Id of the campaign
emailCampaign UpdateEmailCampaign Values to update a campaign

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

UploadImageToGallery

UploadImageModel UploadImageToGallery (UploadImageToGallery uploadImage)

Upload an image to your account's image gallery

Example

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 );
            }
        }
    }
}

Parameters

Name Type Description Notes
uploadImage UploadImageToGallery Parameters to upload an image

Return type

UploadImageModel

Authorization

api-key, partner-key

HTTP request headers

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

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