getbrevo / brevo-csharp

MIT License
4 stars 2 forks source link

Brevo's API v3 C# Library

Brevo's API exposes the entire Brevo 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.

Brevo'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 Brevo:

Frameworks supported

Dependencies

Installation

Generate the DLL using your preferred tool

 **OR**

Install the latest version of our brevo_csharp from nuget.

Getting Started

using System;
using System.Diagnostics;
using brevo_csharp.Api;
using brevo_csharp.Client;
using brevo_csharp.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.brevo.com/v3

Class Method HTTP request Description
AccountApi GetAccount GET /account Get your account information, plan and credits details
AccountApi GetAccountActivity GET /organization/activities Get user activity logs
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 GetSegments GET /contacts/segments Get all the Segments
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
CouponsApi CreateCouponCollection POST /couponCollections Create а coupon collection
CouponsApi CreateCoupons POST /coupons Create coupons for a coupon collection
CouponsApi GetCouponCollection GET /couponCollections/{id} Get a coupon collection by id
CouponsApi GetCouponCollections GET /couponCollections Get all your coupon collections
CouponsApi UpdateCouponCollection PATCH /couponCollections/{id} Update a coupon collection by id
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 CrmPipelineDetailsAllGet GET /crm/pipeline/details/all Get all pipelines
DealsApi CrmPipelineDetailsGet GET /crm/pipeline/details Get pipeline stages
DealsApi CrmPipelineDetailsPipelineIDGet GET /crm/pipeline/details/{pipelineID} Get a pipeline
DomainsApi AuthenticateDomain PUT /senders/domains/{domainName}/authenticate Authenticate a domain
DomainsApi CreateDomain POST /senders/domains Create a new domain
DomainsApi DeleteDomain DELETE /senders/domains/{domainName} Delete a domain
DomainsApi GetDomainConfiguration GET /senders/domains/{domainName} Validate domain configuration
DomainsApi GetDomains GET /senders/domains Get the list of all your domains
EcommerceApi CreateBatchOrder POST /orders/status/batch Create orders in batch
EcommerceApi CreateOrder POST /orders/status Managing the status of the order
EcommerceApi CreateUpdateBatchCategory POST /categories/batch Create categories in batch
EcommerceApi CreateUpdateBatchProducts POST /products/batch Create products in batch
EcommerceApi CreateUpdateCategory POST /categories Create/Update a category
EcommerceApi CreateUpdateProduct POST /products Create/Update a product
EcommerceApi EcommerceActivatePost POST /ecommerce/activate Activate the eCommerce app
EcommerceApi GetCategories GET /categories Return all your categories
EcommerceApi GetCategoryInfo GET /categories/{id} Get a category details
EcommerceApi GetOrders GET /orders Get order 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
EventsApi CreateUnifiedEvent POST /events Create an event
ExternalFeedsApi CreateExternalFeed POST /feeds Create an external feed
ExternalFeedsApi DeleteExternalFeed DELETE /feeds/{uuid} Delete an external feed
ExternalFeedsApi GetAllExternalFeeds GET /feeds Fetch all external feeds
ExternalFeedsApi GetExternalFeedByUUID GET /feeds/{uuid} Get an external feed by UUID
ExternalFeedsApi UpdateExternalFeed PUT /feeds/{uuid} Update an external feed
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 CorporateGroupIdDelete DELETE /corporate/group/{id} Delete a group
MasterAccountApi CorporateGroupIdGet GET /corporate/group/{id} GET a group details
MasterAccountApi CorporateGroupIdPut PUT /corporate/group/{id} Update a group of sub-accounts
MasterAccountApi CorporateGroupPost POST /corporate/group Create a new group of sub-accounts
MasterAccountApi CorporateGroupUnlinkGroupIdSubAccountsPut PUT /corporate/group/unlink/{groupId}/subAccounts Delete sub-account from group
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 CorporateSubAccountIdApplicationsTogglePut PUT /corporate/subAccount/{id}/applications/toggle Enable/disable sub-account application(s)
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 Brevo
MasterAccountApi CorporateUserInvitationActionEmailPut PUT /corporate/user/invitation/{action}/{email} Resend / cancel admin user invitation
MasterAccountApi CorporateUserRevokeEmailDelete DELETE /corporate/user/revoke/{email} Revoke an admin user
MasterAccountApi GetAccountActivity GET /organization/activities Get user activity logs
MasterAccountApi GetCorporateInvitedUsersList GET /corporate/invited/users Get the list of all admin users
MasterAccountApi GetSubAccountGroups GET /corporate/groups Get the list of groups
MasterAccountApi InviteAdminUser POST /corporate/user/invitation/send Send invitation to an admin user
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 Brevo (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
SendersApi ValidateSenderByOTP PUT /senders/{senderId}/validate 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 SmtpLogIdentifierDelete DELETE /smtp/log/{identifier} 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
TransactionalWhatsAppApi GetWhatsappEventReport GET /whatsapp/statistics/events Get all your WhatsApp activity (unaggregated events)
TransactionalWhatsAppApi SendWhatsappMessage POST /whatsapp/sendMessage Send a WhatsApp message
UserApi EditUserPermission POST /organization/user/update/permissions Update permission for a user
UserApi GetInvitedUsersList GET /organization/invited/users Get the list of all your users
UserApi GetUserPermission GET /organization/user/{email}/permissions Check user permission
UserApi Inviteuser POST /organization/user/invitation/send Send invitation to user
UserApi PutRevokeUserPermission PUT /organization/user/invitation/revoke/{email} Revoke user permission
UserApi Putresendcancelinvitation PUT /organization/user/invitation/{action}/{email} Resend / Cancel invitation
WebhooksApi CreateWebhook POST /webhooks Create a webhook
WebhooksApi DeleteWebhook DELETE /webhooks/{webhookId} Delete a webhook
WebhooksApi ExportWebhooksHistory POST /webhooks/export Export all webhook events
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 CreateWhatsAppCampaign POST /whatsappCampaigns Create and Send a WhatsApp campaign
WhatsAppCampaignsApi CreateWhatsAppTemplate POST /whatsppCampaigns/template Create a WhatsApp template
WhatsAppCampaignsApi DeleteWhatsAppCampaign DELETE /whatsappCampaigns/{campaignId} Delete a WhatsApp campaign
WhatsAppCampaignsApi GetWhatsAppCampaign GET /whatsappCampaigns/{campaignId} Get a WhatsApp campaign
WhatsAppCampaignsApi GetWhatsAppCampaigns GET /whatsappCampaigns Return all your created WhatsApp campaigns
WhatsAppCampaignsApi GetWhatsAppConfig GET /whatsappCampaigns/config Get your WhatsApp API account information
WhatsAppCampaignsApi GetWhatsAppTemplates GET /whatsappCampaigns/template-list Return all your created WhatsApp templates
WhatsAppCampaignsApi SendWhatsAppTemplateApproval POST /whatsappCampaigns/template/approval/{templateId} Send your WhatsApp template for approval
WhatsAppCampaignsApi UpdateWhatsAppCampaign PUT /whatsappCampaigns/{campaignId} Update a WhatsApp campaign

Documentation for Models

Documentation for Authorization

api-key

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).