Skip to content

sendinblue/APIv3-go-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SendinBlue's API v3 Go 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 Golang package is automatically generated by the Swagger Codegen project and is reviewed and maintained by SendinBlue:

Installation & Usage

Install the package to your GoLang project.

go get github.com/sendinblue/APIv3-go-library/v2

Getting Started

Please follow the installation procedure and then run the following:

package main
import (
	"fmt"
	"context"
    sendinblue "github.com/sendinblue/APIv3-go-library/v2/lib"
)

func main() {
	var ctx context.Context
	cfg := sendinblue.NewConfiguration()
	//Configure API key authorization: api-key
	cfg.AddDefaultHeader("api-key", "YOUR_API_KEY")
	//Configure API key authorization: partner-key
	cfg.AddDefaultHeader("partner-key","YOUR_API_KEY")

	sib := sendinblue.NewAPIClient(cfg)
	result, resp, err := sib.AccountApi.GetAccount(ctx)
	if err != nil {
		fmt.Println("Error when calling AccountApi->get_account: ",err.Error())
		return
	}
	fmt.Println("GetAccount Object:",result," GetAccount Response: ",resp)
	return 
}

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
AttributesApi CreateAttribute Post /contacts/attributes/{attributeCategory}/{attributeName} Create contact attribute
AttributesApi DeleteAttribute Delete /contacts/attributes/{attributeCategory}/{attributeName} Delete an attribute
AttributesApi GetAttributes Get /contacts/attributes List all attributes
AttributesApi UpdateAttribute Put /contacts/attributes/{attributeCategory}/{attributeName} Update contact attribute
CRMApi CrmNotesGet Get /crm/notes Get all notes
CRMApi CrmNotesIdDelete Delete /crm/notes/{id} Delete a note
CRMApi CrmNotesIdGet Get /crm/notes/{id} Get a note
CRMApi CrmNotesIdPatch Patch /crm/notes/{id} Update a note
CRMApi CrmNotesPost Post /crm/notes Create a note
CRMApi CrmTasksGet Get /crm/tasks Get all tasks
CRMApi CrmTasksIdDelete Delete /crm/tasks/{id} Delete a task
CRMApi CrmTasksIdGet Get /crm/tasks/{id} Get a task
CRMApi CrmTasksIdPatch Patch /crm/tasks/{id} Update a task
CRMApi CrmTasksPost Post /crm/tasks Create a task
CRMApi CrmTasktypesGet Get /crm/tasktypes Get all task types
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
FoldersApi CreateFolder Post /contacts/folders Create a folder
FoldersApi DeleteFolder Delete /contacts/folders/{folderId} Delete a folder (and all its lists)
FoldersApi GetFolder Get /contacts/folders/{folderId} Returns a folder's details
FoldersApi GetFolderLists Get /contacts/folders/{folderId}/lists Get lists in a folder
FoldersApi GetFolders Get /contacts/folders Get all folders
FoldersApi UpdateFolder Put /contacts/folders/{folderId} Update a folder
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.
ListsApi AddContactToList Post /contacts/lists/{listId}/contacts/add Add existing contacts to a list
ListsApi CreateList Post /contacts/lists Create a list
ListsApi DeleteList Delete /contacts/lists/{listId} Delete a list
ListsApi GetContactsFromList Get /contacts/lists/{listId}/contacts Get contacts in a list
ListsApi GetFolderLists Get /contacts/folders/{folderId}/lists Get lists in a folder
ListsApi GetList Get /contacts/lists/{listId} Get a list's details
ListsApi GetLists Get /contacts/lists Get all the lists
ListsApi RemoveContactFromList Post /contacts/lists/{listId}/contacts/remove Delete a contact from a list
ListsApi UpdateList Put /contacts/lists/{listId} Update a list
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 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

Documentation For Models

Documentation For Authorization

api-key

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

partner-key

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

Author

[email protected]