Skip to content

Latest commit

 

History

History
420 lines (327 loc) · 13 KB

SendersApi.md

File metadata and controls

420 lines (327 loc) · 13 KB

sib_api_v3_sdk.Api.SendersApi

All URIs are relative to https://api.sendinblue.com/v3

Method HTTP request Description
CreateSender POST /senders Create a new sender
DeleteSender DELETE /senders/{senderId} Delete a sender
GetIps GET /senders/ips Get all the dedicated IPs for your account
GetIpsFromSender GET /senders/{senderId}/ips Get all the dedicated IPs for a sender
GetSenders GET /senders Get the list of all your senders
UpdateSender PUT /senders/{senderId} Update a sender

CreateSender

CreateSenderModel CreateSender (CreateSender sender = null)

Create a new sender

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 CreateSenderExample
    {
        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 SendersApi();
            var sender = new CreateSender(); // CreateSender | sender's name (optional) 

            try
            {
                // Create a new sender
                CreateSenderModel result = apiInstance.CreateSender(sender);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SendersApi.CreateSender: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
sender CreateSender sender's name [optional]

Return type

CreateSenderModel

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]

DeleteSender

void DeleteSender (long? senderId)

Delete a sender

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 DeleteSenderExample
    {
        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 SendersApi();
            var senderId = 789;  // long? | Id of the sender

            try
            {
                // Delete a sender
                apiInstance.DeleteSender(senderId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SendersApi.DeleteSender: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
senderId long? Id of the sender

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]

GetIps

GetIps GetIps ()

Get all the dedicated IPs for your account

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 GetIpsExample
    {
        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 SendersApi();

            try
            {
                // Get all the dedicated IPs for your account
                GetIps result = apiInstance.GetIps();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SendersApi.GetIps: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

GetIps

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]

GetIpsFromSender

GetIpsFromSender GetIpsFromSender (long? senderId)

Get all the dedicated IPs for a sender

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 GetIpsFromSenderExample
    {
        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 SendersApi();
            var senderId = 789;  // long? | Id of the sender

            try
            {
                // Get all the dedicated IPs for a sender
                GetIpsFromSender result = apiInstance.GetIpsFromSender(senderId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SendersApi.GetIpsFromSender: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
senderId long? Id of the sender

Return type

GetIpsFromSender

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]

GetSenders

GetSendersList GetSenders (string ip = null, string domain = null)

Get the list of all your senders

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 GetSendersExample
    {
        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 SendersApi();
            var ip = ip_example;  // string | Filter your senders for a specific ip (available for dedicated IP usage only) (optional) 
            var domain = domain_example;  // string | Filter your senders for a specific domain (optional) 

            try
            {
                // Get the list of all your senders
                GetSendersList result = apiInstance.GetSenders(ip, domain);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SendersApi.GetSenders: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
ip string Filter your senders for a specific ip (available for dedicated IP usage only) [optional]
domain string Filter your senders for a specific domain [optional]

Return type

GetSendersList

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]

UpdateSender

void UpdateSender (long? senderId, UpdateSender sender = null)

Update a sender

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 UpdateSenderExample
    {
        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 SendersApi();
            var senderId = 789;  // long? | Id of the sender
            var sender = new UpdateSender(); // UpdateSender | sender's name (optional) 

            try
            {
                // Update a sender
                apiInstance.UpdateSender(senderId, sender);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SendersApi.UpdateSender: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
senderId long? Id of the sender
sender UpdateSender sender's name [optional]

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]