Skip to content

sendinblue/APIv3-csharp-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[DEPRECATED:warning:] api-v3-sdk

SendinBlue's API v3 C# Library

SendinBlue's API exposes the entire SendinBlue features via a standardized programmatic interface. Please refer to the full documentation to learn more.

This is the wrapper for the API. It implements all the features of the API v3.

SendinBlue's API matches the OpenAPI v2 definition. The specification can be downloaded here.

This C# SDK is automatically generated by the Swagger Codegen project and is reviewed and maintained by SendinBlue:

Frameworks supported

  • .NET Core >=1.0
  • .NET Framework >=4.6.1
  • Mono/Xamarin >=vNext
  • UWP >=10.0

Dependencies

  • FubarCoder.RestSharp.Portable.Core >=4.0.8
  • FubarCoder.RestSharp.Portable.HttpClient >=4.0.8
  • Newtonsoft.Json >=10.0.3

Installation

Generate the DLL using your preferred tool

 **OR**

Install the latest version of our sib_api_v3_sdk from nuget.

  • Use the namespaces:
using sib_api_v3_sdk.Api;
using sib_api_v3_sdk.Client;
using sib_api_v3_sdk.Model;

Getting Started

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 Example
    {
        public void main()
        {

            // Configure API key authorization: api-key
            Configuration.Default.ApiKey.Add("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("api-key", "Bearer");
            // Configure API key authorization: partner-key
            Configuration.Default.ApiKey.Add("partner-key", "YOUR_PARTNER_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("partner-key", "Bearer");

            var apiInstance = new AccountApi();

            try
            {
                // Get your account information, plan and credits details
                GetAccount result = apiInstance.GetAccount();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountApi.GetAccount: " + e.Message );
            }

        }
    }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
AccountApi GetAccount GET /account Get your account information, plan and credits details
CompaniesApi CompaniesAttributesGet GET /companies/attributes Get company attributes
CompaniesApi CompaniesGet GET /companies Get all companies
CompaniesApi CompaniesIdDelete DELETE /companies/{id} Delete a company
CompaniesApi CompaniesIdGet GET /companies/{id} Get a company
CompaniesApi CompaniesIdPatch PATCH /companies/{id} Update a company
CompaniesApi CompaniesLinkUnlinkIdPatch PATCH /companies/link-unlink/{id} Link and Unlink company with contacts and deals
CompaniesApi CompaniesPost POST /companies Create a company
ContactsApi AddContactToList POST /contacts/lists/{listId}/contacts/add Add existing contacts to a list
ContactsApi CreateAttribute POST /contacts/attributes/{attributeCategory}/{attributeName} Create contact attribute
ContactsApi CreateContact POST /contacts Create a contact
ContactsApi CreateDoiContact POST /contacts/doubleOptinConfirmation Create Contact via DOI (Double-Opt-In) Flow
ContactsApi CreateFolder POST /contacts/folders Create a folder
ContactsApi CreateList POST /contacts/lists Create a list
ContactsApi DeleteAttribute DELETE /contacts/attributes/{attributeCategory}/{attributeName} Delete an attribute
ContactsApi DeleteContact DELETE /contacts/{identifier} Delete a contact
ContactsApi DeleteFolder DELETE /contacts/folders/{folderId} Delete a folder (and all its lists)
ContactsApi DeleteList DELETE /contacts/lists/{listId} Delete a list
ContactsApi GetAttributes GET /contacts/attributes List all attributes
ContactsApi GetContactInfo GET /contacts/{identifier} Get a contact's details
ContactsApi GetContactStats GET /contacts/{identifier}/campaignStats Get email campaigns' statistics for a contact
ContactsApi GetContacts GET /contacts Get all the contacts
ContactsApi GetContactsFromList GET /contacts/lists/{listId}/contacts Get contacts in a list
ContactsApi GetFolder GET /contacts/folders/{folderId} Returns a folder's details
ContactsApi GetFolderLists GET /contacts/folders/{folderId}/lists Get lists in a folder
ContactsApi GetFolders GET /contacts/folders Get all folders
ContactsApi GetList GET /contacts/lists/{listId} Get a list's details
ContactsApi GetLists GET /contacts/lists Get all the lists
ContactsApi ImportContacts POST /contacts/import Import contacts
ContactsApi RemoveContactFromList POST /contacts/lists/{listId}/contacts/remove Delete a contact from a list
ContactsApi RequestContactExport POST /contacts/export Export contacts
ContactsApi UpdateAttribute PUT /contacts/attributes/{attributeCategory}/{attributeName} Update contact attribute
ContactsApi UpdateBatchContacts POST /contacts/batch Update multiple contacts
ContactsApi UpdateContact PUT /contacts/{identifier} Update a contact
ContactsApi UpdateFolder PUT /contacts/folders/{folderId} Update a folder
ContactsApi UpdateList PUT /contacts/lists/{listId} Update a list
ConversationsApi ConversationsAgentOnlinePingPost POST /conversations/agentOnlinePing Sets agent’s status to online for 2-3 minutes
ConversationsApi ConversationsMessagesIdDelete DELETE /conversations/messages/{id} Delete a message sent by an agent
ConversationsApi ConversationsMessagesIdGet GET /conversations/messages/{id} Get a message
ConversationsApi ConversationsMessagesIdPut PUT /conversations/messages/{id} Update a message sent by an agent
ConversationsApi ConversationsMessagesPost POST /conversations/messages Send a message as an agent
ConversationsApi ConversationsPushedMessagesIdDelete DELETE /conversations/pushedMessages/{id} Delete an automated message
ConversationsApi ConversationsPushedMessagesIdGet GET /conversations/pushedMessages/{id} Get an automated message
ConversationsApi ConversationsPushedMessagesIdPut PUT /conversations/pushedMessages/{id} Update an automated message
ConversationsApi ConversationsPushedMessagesPost POST /conversations/pushedMessages Send an automated message to a visitor
DealsApi CrmAttributesDealsGet GET /crm/attributes/deals Get deal attributes
DealsApi CrmDealsGet GET /crm/deals Get all deals
DealsApi CrmDealsIdDelete DELETE /crm/deals/{id} Delete a deal
DealsApi CrmDealsIdGet GET /crm/deals/{id} Get a deal
DealsApi CrmDealsIdPatch PATCH /crm/deals/{id} Update a deal
DealsApi CrmDealsLinkUnlinkIdPatch PATCH /crm/deals/link-unlink/{id} Link and Unlink a deal with contacts and companies
DealsApi CrmDealsPost POST /crm/deals Create a deal
DealsApi CrmPipelineDetailsGet GET /crm/pipeline/details Get pipeline stages
EcommerceApi CreateBatchOrder POST /orders/status/batch Maintains a batch of orders
EcommerceApi CreateOrder POST /orders/status Maintains every transactional status of the order
EcommerceApi CreateUpdateBatchCategory POST /categories/batch Create the categories in a batch
EcommerceApi CreateUpdateBatchProducts POST /products/batch Creates the products in a batch
EcommerceApi CreateUpdateCategory POST /categories Create/Update a category
EcommerceApi CreateUpdateProduct POST /products Create/Update a product
EcommerceApi EcommerceActivatePost POST /ecommerce/activate Fulfills the eCommerce pre-requisites
EcommerceApi GetCategories GET /categories Return all your categories
EcommerceApi GetCategoryInfo GET /categories/{id} Get a category details
EcommerceApi GetProductInfo GET /products/{id} Get a product's details
EcommerceApi GetProducts GET /products Return all your products
EmailCampaignsApi CreateEmailCampaign POST /emailCampaigns Create an email campaign
EmailCampaignsApi DeleteEmailCampaign DELETE /emailCampaigns/{campaignId} Delete an email campaign
EmailCampaignsApi EmailExportRecipients POST /emailCampaigns/{campaignId}/exportRecipients Export the recipients of an email campaign
EmailCampaignsApi GetAbTestCampaignResult GET /emailCampaigns/{campaignId}/abTestCampaignResult Get an A/B test email campaign results
EmailCampaignsApi GetEmailCampaign GET /emailCampaigns/{campaignId} Get an email campaign report
EmailCampaignsApi GetEmailCampaigns GET /emailCampaigns Return all your created email campaigns
EmailCampaignsApi GetSharedTemplateUrl GET /emailCampaigns/{campaignId}/sharedUrl Get a shared template url
EmailCampaignsApi SendEmailCampaignNow POST /emailCampaigns/{campaignId}/sendNow Send an email campaign immediately, based on campaignId
EmailCampaignsApi SendReport POST /emailCampaigns/{campaignId}/sendReport Send the report of a campaign
EmailCampaignsApi SendTestEmail POST /emailCampaigns/{campaignId}/sendTest Send an email campaign to your test list
EmailCampaignsApi UpdateCampaignStatus PUT /emailCampaigns/{campaignId}/status Update an email campaign status
EmailCampaignsApi UpdateEmailCampaign PUT /emailCampaigns/{campaignId} Update an email campaign
EmailCampaignsApi UploadImageToGallery POST /emailCampaigns/images Upload an image to your account's image gallery
FilesApi CrmFilesGet GET /crm/files Get all files
FilesApi CrmFilesIdDataGet GET /crm/files/{id}/data Get file details
FilesApi CrmFilesIdDelete DELETE /crm/files/{id} Delete a file
FilesApi CrmFilesIdGet GET /crm/files/{id} Download a file
FilesApi CrmFilesPost POST /crm/files Upload a file
InboundParsingApi GetInboundEmailAttachment GET /inbound/attachments/{downloadToken} Retrieve inbound attachment with download token.
InboundParsingApi GetInboundEmailEvents GET /inbound/events Get the list of all the events for the received emails.
InboundParsingApi GetInboundEmailEventsByUuid GET /inbound/events/{uuid} Fetch all events history for one particular received email.
MasterAccountApi CorporateMasterAccountGet GET /corporate/masterAccount Get the details of requested master account
MasterAccountApi CorporateSubAccountGet GET /corporate/subAccount Get the list of all the sub-accounts of the master account.
MasterAccountApi CorporateSubAccountIdDelete DELETE /corporate/subAccount/{id} Delete a sub-account
MasterAccountApi CorporateSubAccountIdGet GET /corporate/subAccount/{id} Get sub-account details
MasterAccountApi CorporateSubAccountIdPlanPut PUT /corporate/subAccount/{id}/plan Update sub-account plan
MasterAccountApi CorporateSubAccountKeyPost POST /corporate/subAccount/key Create an API key for a sub-account
MasterAccountApi CorporateSubAccountPost POST /corporate/subAccount Create a new sub-account under a master account.
MasterAccountApi CorporateSubAccountSsoTokenPost POST /corporate/subAccount/ssoToken Generate SSO token to access Sendinblue
NotesApi CrmNotesGet GET /crm/notes Get all notes
NotesApi CrmNotesIdDelete DELETE /crm/notes/{id} Delete a note
NotesApi CrmNotesIdGet GET /crm/notes/{id} Get a note
NotesApi CrmNotesIdPatch PATCH /crm/notes/{id} Update a note
NotesApi CrmNotesPost POST /crm/notes Create a note
ProcessApi GetProcess GET /processes/{processId} Return the informations for a process
ProcessApi GetProcesses GET /processes Return all the processes for your account
ResellerApi AddCredits POST /reseller/children/{childIdentifier}/credits/add Add Email and/or SMS credits to a specific child account
ResellerApi AssociateIpToChild POST /reseller/children/{childIdentifier}/ips/associate Associate a dedicated IP to the child
ResellerApi CreateChildDomain POST /reseller/children/{childIdentifier}/domains Create a domain for a child account
ResellerApi CreateResellerChild POST /reseller/children Creates a reseller child
ResellerApi DeleteChildDomain DELETE /reseller/children/{childIdentifier}/domains/{domainName} Delete the sender domain of the reseller child based on the childIdentifier and domainName passed
ResellerApi DeleteResellerChild DELETE /reseller/children/{childIdentifier} Delete a single reseller child based on the child identifier supplied
ResellerApi DissociateIpFromChild POST /reseller/children/{childIdentifier}/ips/dissociate Dissociate a dedicated IP to the child
ResellerApi GetChildAccountCreationStatus GET /reseller/children/{childIdentifier}/accountCreationStatus Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied
ResellerApi GetChildDomains GET /reseller/children/{childIdentifier}/domains Get all sender domains for a specific child account
ResellerApi GetChildInfo GET /reseller/children/{childIdentifier} Get a child account's details
ResellerApi GetResellerChilds GET /reseller/children Get the list of all children accounts
ResellerApi GetSsoToken GET /reseller/children/{childIdentifier}/auth Get session token to access Sendinblue (SSO)
ResellerApi RemoveCredits POST /reseller/children/{childIdentifier}/credits/remove Remove Email and/or SMS credits from a specific child account
ResellerApi UpdateChildAccountStatus PUT /reseller/children/{childIdentifier}/accountStatus Update info of reseller's child account status based on the childIdentifier supplied
ResellerApi UpdateChildDomain PUT /reseller/children/{childIdentifier}/domains/{domainName} Update the sender domain of reseller's child based on the childIdentifier and domainName passed
ResellerApi UpdateResellerChild PUT /reseller/children/{childIdentifier} Update info of reseller's child based on the child identifier supplied
SMSCampaignsApi CreateSmsCampaign POST /smsCampaigns Creates an SMS campaign
SMSCampaignsApi DeleteSmsCampaign DELETE /smsCampaigns/{campaignId} Delete an SMS campaign
SMSCampaignsApi GetSmsCampaign GET /smsCampaigns/{campaignId} Get an SMS campaign
SMSCampaignsApi GetSmsCampaigns GET /smsCampaigns Returns the information for all your created SMS campaigns
SMSCampaignsApi RequestSmsRecipientExport POST /smsCampaigns/{campaignId}/exportRecipients Export an SMS campaign's recipients
SMSCampaignsApi SendSmsCampaignNow POST /smsCampaigns/{campaignId}/sendNow Send your SMS campaign immediately
SMSCampaignsApi SendSmsReport POST /smsCampaigns/{campaignId}/sendReport Send an SMS campaign's report
SMSCampaignsApi SendTestSms POST /smsCampaigns/{campaignId}/sendTest Send a test SMS campaign
SMSCampaignsApi UpdateSmsCampaign PUT /smsCampaigns/{campaignId} Update an SMS campaign
SMSCampaignsApi UpdateSmsCampaignStatus PUT /smsCampaigns/{campaignId}/status Update a campaign's status
SendersApi CreateSender POST /senders Create a new sender
SendersApi DeleteSender DELETE /senders/{senderId} Delete a sender
SendersApi GetIps GET /senders/ips Get all the dedicated IPs for your account
SendersApi GetIpsFromSender GET /senders/{senderId}/ips Get all the dedicated IPs for a sender
SendersApi GetSenders GET /senders Get the list of all your senders
SendersApi UpdateSender PUT /senders/{senderId} Update a sender
TasksApi CrmTasksGet GET /crm/tasks Get all tasks
TasksApi CrmTasksIdDelete DELETE /crm/tasks/{id} Delete a task
TasksApi CrmTasksIdGet GET /crm/tasks/{id} Get a task
TasksApi CrmTasksIdPatch PATCH /crm/tasks/{id} Update a task
TasksApi CrmTasksPost POST /crm/tasks Create a task
TasksApi CrmTasktypesGet GET /crm/tasktypes Get all task types
TransactionalEmailsApi BlockNewDomain POST /smtp/blockedDomains Add a new domain to the list of blocked domains
TransactionalEmailsApi CreateSmtpTemplate POST /smtp/templates Create an email template
TransactionalEmailsApi DeleteBlockedDomain DELETE /smtp/blockedDomains/{domain} Unblock an existing domain from the list of blocked domains
TransactionalEmailsApi DeleteHardbounces POST /smtp/deleteHardbounces Delete hardbounces
TransactionalEmailsApi DeleteScheduledEmailById DELETE /smtp/email/{identifier} Delete scheduled emails by batchId or messageId
TransactionalEmailsApi DeleteSmtpTemplate DELETE /smtp/templates/{templateId} Delete an inactive email template
TransactionalEmailsApi GetAggregatedSmtpReport GET /smtp/statistics/aggregatedReport Get your transactional email activity aggregated over a period of time
TransactionalEmailsApi GetBlockedDomains GET /smtp/blockedDomains Get the list of blocked domains
TransactionalEmailsApi GetEmailEventReport GET /smtp/statistics/events Get all your transactional email activity (unaggregated events)
TransactionalEmailsApi GetScheduledEmailByBatchId GET /smtp/emailStatus/{batchId} Fetch scheduled emails by batchId
TransactionalEmailsApi GetScheduledEmailByMessageId GET /smtp/emailStatus/{messageId} Fetch scheduled email by messageId
TransactionalEmailsApi GetSmtpReport GET /smtp/statistics/reports Get your transactional email activity aggregated per day
TransactionalEmailsApi GetSmtpTemplate GET /smtp/templates/{templateId} Returns the template information
TransactionalEmailsApi GetSmtpTemplates GET /smtp/templates Get the list of email templates
TransactionalEmailsApi GetTransacBlockedContacts GET /smtp/blockedContacts Get the list of blocked or unsubscribed transactional contacts
TransactionalEmailsApi GetTransacEmailContent GET /smtp/emails/{uuid} Get the personalized content of a sent transactional email
TransactionalEmailsApi GetTransacEmailsList GET /smtp/emails Get the list of transactional emails on the basis of allowed filters
TransactionalEmailsApi SendTestTemplate POST /smtp/templates/{templateId}/sendTest Send a template to your test list
TransactionalEmailsApi SendTransacEmail POST /smtp/email Send a transactional email
TransactionalEmailsApi SmtpBlockedContactsEmailDelete DELETE /smtp/blockedContacts/{email} Unblock or resubscribe a transactional contact
TransactionalEmailsApi SmtpLogMessageIdDelete DELETE /smtp/log/{messageId} Delete an SMTP transactional log
TransactionalEmailsApi UpdateSmtpTemplate PUT /smtp/templates/{templateId} Update an email template
TransactionalSMSApi GetSmsEvents GET /transactionalSMS/statistics/events Get all your SMS activity (unaggregated events)
TransactionalSMSApi GetTransacAggregatedSmsReport GET /transactionalSMS/statistics/aggregatedReport Get your SMS activity aggregated over a period of time
TransactionalSMSApi GetTransacSmsReport GET /transactionalSMS/statistics/reports Get your SMS activity aggregated per day
TransactionalSMSApi SendTransacSms POST /transactionalSMS/sms Send SMS message to a mobile number
WebhooksApi CreateWebhook POST /webhooks Create a webhook
WebhooksApi DeleteWebhook DELETE /webhooks/{webhookId} Delete a webhook
WebhooksApi GetWebhook GET /webhooks/{webhookId} Get a webhook details
WebhooksApi GetWebhooks GET /webhooks Get all webhooks
WebhooksApi UpdateWebhook PUT /webhooks/{webhookId} Update a webhook
WhatsappCampaignsApi DeleteWhatsappCampaign DELETE /whatsappCampaigns/{campaignId} Delete a whatsapp campaign
WhatsappCampaignsApi GetWhatsappCampaign GET /whatsappCampaigns/{campaignId} Get Whatsapp campaign Overview

Documentation for Models

Documentation for Authorization

api-key

  • Type: API key
  • API key parameter name: api-key
  • Location: HTTP header

partner-key

The partner key should be passed in the request headers as partner-key along with api-key pair for successful authentication of partner (Optional).

  • Type: API key
  • API key parameter name: partner-key
  • Location: HTTP header

Support and Feedback

Be sure to visit the SendinBlue official documentation website for additional information about our API.

If you find a bug, please post the issue on Github.

As always, if you need additional assistance, drop us a note here.