Categorygithub.com/sendinblue/APIv3-go-library/v2

# README

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

ClassMethodHTTP requestDescription
AccountApiGetAccountGet /accountGet your account information, plan and credits details
AttributesApiCreateAttributePost /contacts/attributes/{attributeCategory}/{attributeName}Create contact attribute
AttributesApiDeleteAttributeDelete /contacts/attributes/{attributeCategory}/{attributeName}Delete an attribute
AttributesApiGetAttributesGet /contacts/attributesList all attributes
AttributesApiUpdateAttributePut /contacts/attributes/{attributeCategory}/{attributeName}Update contact attribute
CRMApiCrmNotesGetGet /crm/notesGet all notes
CRMApiCrmNotesIdDeleteDelete /crm/notes/{id}Delete a note
CRMApiCrmNotesIdGetGet /crm/notes/{id}Get a note
CRMApiCrmNotesIdPatchPatch /crm/notes/{id}Update a note
CRMApiCrmNotesPostPost /crm/notesCreate a note
CRMApiCrmTasksGetGet /crm/tasksGet all tasks
CRMApiCrmTasksIdDeleteDelete /crm/tasks/{id}Delete a task
CRMApiCrmTasksIdGetGet /crm/tasks/{id}Get a task
CRMApiCrmTasksIdPatchPatch /crm/tasks/{id}Update a task
CRMApiCrmTasksPostPost /crm/tasksCreate a task
CRMApiCrmTasktypesGetGet /crm/tasktypesGet all task types
CompaniesApiCompaniesAttributesGetGet /companies/attributesGet company attributes
CompaniesApiCompaniesGetGet /companiesGet all companies
CompaniesApiCompaniesIdDeleteDelete /companies/{id}Delete a company
CompaniesApiCompaniesIdGetGet /companies/{id}Get a company
CompaniesApiCompaniesIdPatchPatch /companies/{id}Update a company
CompaniesApiCompaniesLinkUnlinkIdPatchPatch /companies/link-unlink/{id}Link and Unlink company with contacts and deals
CompaniesApiCompaniesPostPost /companiesCreate a company
ContactsApiAddContactToListPost /contacts/lists/{listId}/contacts/addAdd existing contacts to a list
ContactsApiCreateAttributePost /contacts/attributes/{attributeCategory}/{attributeName}Create contact attribute
ContactsApiCreateContactPost /contactsCreate a contact
ContactsApiCreateDoiContactPost /contacts/doubleOptinConfirmationCreate Contact via DOI (Double-Opt-In) Flow
ContactsApiCreateFolderPost /contacts/foldersCreate a folder
ContactsApiCreateListPost /contacts/listsCreate a list
ContactsApiDeleteAttributeDelete /contacts/attributes/{attributeCategory}/{attributeName}Delete an attribute
ContactsApiDeleteContactDelete /contacts/{identifier}Delete a contact
ContactsApiDeleteFolderDelete /contacts/folders/{folderId}Delete a folder (and all its lists)
ContactsApiDeleteListDelete /contacts/lists/{listId}Delete a list
ContactsApiGetAttributesGet /contacts/attributesList all attributes
ContactsApiGetContactInfoGet /contacts/{identifier}Get a contact's details
ContactsApiGetContactStatsGet /contacts/{identifier}/campaignStatsGet email campaigns' statistics for a contact
ContactsApiGetContactsGet /contactsGet all the contacts
ContactsApiGetContactsFromListGet /contacts/lists/{listId}/contactsGet contacts in a list
ContactsApiGetFolderGet /contacts/folders/{folderId}Returns a folder's details
ContactsApiGetFolderListsGet /contacts/folders/{folderId}/listsGet lists in a folder
ContactsApiGetFoldersGet /contacts/foldersGet all folders
ContactsApiGetListGet /contacts/lists/{listId}Get a list's details
ContactsApiGetListsGet /contacts/listsGet all the lists
ContactsApiImportContactsPost /contacts/importImport contacts
ContactsApiRemoveContactFromListPost /contacts/lists/{listId}/contacts/removeDelete a contact from a list
ContactsApiRequestContactExportPost /contacts/exportExport contacts
ContactsApiUpdateAttributePut /contacts/attributes/{attributeCategory}/{attributeName}Update contact attribute
ContactsApiUpdateBatchContactsPost /contacts/batchUpdate multiple contacts
ContactsApiUpdateContactPut /contacts/{identifier}Update a contact
ContactsApiUpdateFolderPut /contacts/folders/{folderId}Update a folder
ContactsApiUpdateListPut /contacts/lists/{listId}Update a list
ConversationsApiConversationsAgentOnlinePingPostPost /conversations/agentOnlinePingSets agent’s status to online for 2-3 minutes
ConversationsApiConversationsMessagesIdDeleteDelete /conversations/messages/{id}Delete a message sent by an agent
ConversationsApiConversationsMessagesIdGetGet /conversations/messages/{id}Get a message
ConversationsApiConversationsMessagesIdPutPut /conversations/messages/{id}Update a message sent by an agent
ConversationsApiConversationsMessagesPostPost /conversations/messagesSend a message as an agent
ConversationsApiConversationsPushedMessagesIdDeleteDelete /conversations/pushedMessages/{id}Delete an automated message
ConversationsApiConversationsPushedMessagesIdGetGet /conversations/pushedMessages/{id}Get an automated message
ConversationsApiConversationsPushedMessagesIdPutPut /conversations/pushedMessages/{id}Update an automated message
ConversationsApiConversationsPushedMessagesPostPost /conversations/pushedMessagesSend an automated message to a visitor
DealsApiCrmAttributesDealsGetGet /crm/attributes/dealsGet deal attributes
DealsApiCrmDealsGetGet /crm/dealsGet all deals
DealsApiCrmDealsIdDeleteDelete /crm/deals/{id}Delete a deal
DealsApiCrmDealsIdGetGet /crm/deals/{id}Get a deal
DealsApiCrmDealsIdPatchPatch /crm/deals/{id}Update a deal
DealsApiCrmDealsLinkUnlinkIdPatchPatch /crm/deals/link-unlink/{id}Link and Unlink a deal with contacts and companies
DealsApiCrmDealsPostPost /crm/dealsCreate a deal
DealsApiCrmPipelineDetailsGetGet /crm/pipeline/detailsGet pipeline stages
EcommerceApiCreateBatchOrderPost /orders/status/batchMaintains a batch of orders
EcommerceApiCreateOrderPost /orders/statusMaintains every transactional status of the order
EcommerceApiCreateUpdateBatchCategoryPost /categories/batchCreate the categories in a batch
EcommerceApiCreateUpdateBatchProductsPost /products/batchCreates the products in a batch
EcommerceApiCreateUpdateCategoryPost /categoriesCreate/Update a category
EcommerceApiCreateUpdateProductPost /productsCreate/Update a product
EcommerceApiEcommerceActivatePostPost /ecommerce/activateFulfills the eCommerce pre-requisites
EcommerceApiGetCategoriesGet /categoriesReturn all your categories
EcommerceApiGetCategoryInfoGet /categories/{id}Get a category details
EcommerceApiGetProductInfoGet /products/{id}Get a product's details
EcommerceApiGetProductsGet /productsReturn all your products
EmailCampaignsApiCreateEmailCampaignPost /emailCampaignsCreate an email campaign
EmailCampaignsApiDeleteEmailCampaignDelete /emailCampaigns/{campaignId}Delete an email campaign
EmailCampaignsApiEmailExportRecipientsPost /emailCampaigns/{campaignId}/exportRecipientsExport the recipients of an email campaign
EmailCampaignsApiGetAbTestCampaignResultGet /emailCampaigns/{campaignId}/abTestCampaignResultGet an A/B test email campaign results
EmailCampaignsApiGetEmailCampaignGet /emailCampaigns/{campaignId}Get an email campaign report
EmailCampaignsApiGetEmailCampaignsGet /emailCampaignsReturn all your created email campaigns
EmailCampaignsApiGetSharedTemplateUrlGet /emailCampaigns/{campaignId}/sharedUrlGet a shared template url
EmailCampaignsApiSendEmailCampaignNowPost /emailCampaigns/{campaignId}/sendNowSend an email campaign immediately, based on campaignId
EmailCampaignsApiSendReportPost /emailCampaigns/{campaignId}/sendReportSend the report of a campaign
EmailCampaignsApiSendTestEmailPost /emailCampaigns/{campaignId}/sendTestSend an email campaign to your test list
EmailCampaignsApiUpdateCampaignStatusPut /emailCampaigns/{campaignId}/statusUpdate an email campaign status
EmailCampaignsApiUpdateEmailCampaignPut /emailCampaigns/{campaignId}Update an email campaign
EmailCampaignsApiUploadImageToGalleryPost /emailCampaigns/imagesUpload an image to your account's image gallery
FoldersApiCreateFolderPost /contacts/foldersCreate a folder
FoldersApiDeleteFolderDelete /contacts/folders/{folderId}Delete a folder (and all its lists)
FoldersApiGetFolderGet /contacts/folders/{folderId}Returns a folder's details
FoldersApiGetFolderListsGet /contacts/folders/{folderId}/listsGet lists in a folder
FoldersApiGetFoldersGet /contacts/foldersGet all folders
FoldersApiUpdateFolderPut /contacts/folders/{folderId}Update a folder
InboundParsingApiGetInboundEmailEventsGet /inbound/eventsGet the list of all the events for the received emails.
InboundParsingApiGetInboundEmailEventsByUuidGet /inbound/events/{uuid}Fetch all events history for one particular received email.
ListsApiAddContactToListPost /contacts/lists/{listId}/contacts/addAdd existing contacts to a list
ListsApiCreateListPost /contacts/listsCreate a list
ListsApiDeleteListDelete /contacts/lists/{listId}Delete a list
ListsApiGetContactsFromListGet /contacts/lists/{listId}/contactsGet contacts in a list
ListsApiGetFolderListsGet /contacts/folders/{folderId}/listsGet lists in a folder
ListsApiGetListGet /contacts/lists/{listId}Get a list's details
ListsApiGetListsGet /contacts/listsGet all the lists
ListsApiRemoveContactFromListPost /contacts/lists/{listId}/contacts/removeDelete a contact from a list
ListsApiUpdateListPut /contacts/lists/{listId}Update a list
MasterAccountApiCorporateMasterAccountGetGet /corporate/masterAccountGet the details of requested master account
MasterAccountApiCorporateSubAccountGetGet /corporate/subAccountGet the list of all the sub-accounts of the master account.
MasterAccountApiCorporateSubAccountIdDeleteDelete /corporate/subAccount/{id}Delete a sub-account
MasterAccountApiCorporateSubAccountIdGetGet /corporate/subAccount/{id}Get sub-account details
MasterAccountApiCorporateSubAccountIdPlanPutPut /corporate/subAccount/{id}/planUpdate sub-account plan
MasterAccountApiCorporateSubAccountPostPost /corporate/subAccountCreate a new sub-account under a master account.
MasterAccountApiCorporateSubAccountSsoTokenPostPost /corporate/subAccount/ssoTokenGenerate SSO token to access Sendinblue
NotesApiCrmNotesGetGet /crm/notesGet all notes
NotesApiCrmNotesIdDeleteDelete /crm/notes/{id}Delete a note
NotesApiCrmNotesIdGetGet /crm/notes/{id}Get a note
NotesApiCrmNotesIdPatchPatch /crm/notes/{id}Update a note
NotesApiCrmNotesPostPost /crm/notesCreate a note
ProcessApiGetProcessGet /processes/{processId}Return the informations for a process
ProcessApiGetProcessesGet /processesReturn all the processes for your account
ResellerApiAddCreditsPost /reseller/children/{childIdentifier}/credits/addAdd Email and/or SMS credits to a specific child account
ResellerApiAssociateIpToChildPost /reseller/children/{childIdentifier}/ips/associateAssociate a dedicated IP to the child
ResellerApiCreateChildDomainPost /reseller/children/{childIdentifier}/domainsCreate a domain for a child account
ResellerApiCreateResellerChildPost /reseller/childrenCreates a reseller child
ResellerApiDeleteChildDomainDelete /reseller/children/{childIdentifier}/domains/{domainName}Delete the sender domain of the reseller child based on the childIdentifier and domainName passed
ResellerApiDeleteResellerChildDelete /reseller/children/{childIdentifier}Delete a single reseller child based on the child identifier supplied
ResellerApiDissociateIpFromChildPost /reseller/children/{childIdentifier}/ips/dissociateDissociate a dedicated IP to the child
ResellerApiGetChildAccountCreationStatusGet /reseller/children/{childIdentifier}/accountCreationStatusGet the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the identifier supplied
ResellerApiGetChildDomainsGet /reseller/children/{childIdentifier}/domainsGet all sender domains for a specific child account
ResellerApiGetChildInfoGet /reseller/children/{childIdentifier}Get a child account's details
ResellerApiGetResellerChildsGet /reseller/childrenGet the list of all children accounts
ResellerApiGetSsoTokenGet /reseller/children/{childIdentifier}/authGet session token to access Sendinblue (SSO)
ResellerApiRemoveCreditsPost /reseller/children/{childIdentifier}/credits/removeRemove Email and/or SMS credits from a specific child account
ResellerApiUpdateChildAccountStatusPut /reseller/children/{childIdentifier}/accountStatusUpdate info of reseller's child account status based on the childIdentifier supplied
ResellerApiUpdateChildDomainPut /reseller/children/{childIdentifier}/domains/{domainName}Update the sender domain of reseller's child based on the childIdentifier and domainName passed
ResellerApiUpdateResellerChildPut /reseller/children/{childIdentifier}Update info of reseller's child based on the child identifier supplied
SMSCampaignsApiCreateSmsCampaignPost /smsCampaignsCreates an SMS campaign
SMSCampaignsApiDeleteSmsCampaignDelete /smsCampaigns/{campaignId}Delete an SMS campaign
SMSCampaignsApiGetSmsCampaignGet /smsCampaigns/{campaignId}Get an SMS campaign
SMSCampaignsApiGetSmsCampaignsGet /smsCampaignsReturns the information for all your created SMS campaigns
SMSCampaignsApiRequestSmsRecipientExportPost /smsCampaigns/{campaignId}/exportRecipientsExport an SMS campaign's recipients
SMSCampaignsApiSendSmsCampaignNowPost /smsCampaigns/{campaignId}/sendNowSend your SMS campaign immediately
SMSCampaignsApiSendSmsReportPost /smsCampaigns/{campaignId}/sendReportSend an SMS campaign's report
SMSCampaignsApiSendTestSmsPost /smsCampaigns/{campaignId}/sendTestSend a test SMS campaign
SMSCampaignsApiUpdateSmsCampaignPut /smsCampaigns/{campaignId}Update an SMS campaign
SMSCampaignsApiUpdateSmsCampaignStatusPut /smsCampaigns/{campaignId}/statusUpdate a campaign's status
SendersApiCreateSenderPost /sendersCreate a new sender
SendersApiDeleteSenderDelete /senders/{senderId}Delete a sender
SendersApiGetIpsGet /senders/ipsGet all the dedicated IPs for your account
SendersApiGetIpsFromSenderGet /senders/{senderId}/ipsGet all the dedicated IPs for a sender
SendersApiGetSendersGet /sendersGet the list of all your senders
SendersApiUpdateSenderPut /senders/{senderId}Update a sender
TasksApiCrmTasksGetGet /crm/tasksGet all tasks
TasksApiCrmTasksIdDeleteDelete /crm/tasks/{id}Delete a task
TasksApiCrmTasksIdGetGet /crm/tasks/{id}Get a task
TasksApiCrmTasksIdPatchPatch /crm/tasks/{id}Update a task
TasksApiCrmTasksPostPost /crm/tasksCreate a task
TasksApiCrmTasktypesGetGet /crm/tasktypesGet all task types
TransactionalEmailsApiBlockNewDomainPost /smtp/blockedDomainsAdd a new domain to the list of blocked domains
TransactionalEmailsApiCreateSmtpTemplatePost /smtp/templatesCreate an email template
TransactionalEmailsApiDeleteBlockedDomainDelete /smtp/blockedDomains/{domain}Unblock an existing domain from the list of blocked domains
TransactionalEmailsApiDeleteHardbouncesPost /smtp/deleteHardbouncesDelete hardbounces
TransactionalEmailsApiDeleteScheduledEmailByIdDelete /smtp/email/{identifier}Delete scheduled emails by batchId or messageId
TransactionalEmailsApiDeleteSmtpTemplateDelete /smtp/templates/{templateId}Delete an inactive email template
TransactionalEmailsApiGetAggregatedSmtpReportGet /smtp/statistics/aggregatedReportGet your transactional email activity aggregated over a period of time
TransactionalEmailsApiGetBlockedDomainsGet /smtp/blockedDomainsGet the list of blocked domains
TransactionalEmailsApiGetEmailEventReportGet /smtp/statistics/eventsGet all your transactional email activity (unaggregated events)
TransactionalEmailsApiGetScheduledEmailByBatchIdGet /smtp/emailStatus/{batchId}Fetch scheduled emails by batchId
TransactionalEmailsApiGetScheduledEmailByMessageIdGet /smtp/emailStatus/{messageId}Fetch scheduled email by messageId
TransactionalEmailsApiGetSmtpReportGet /smtp/statistics/reportsGet your transactional email activity aggregated per day
TransactionalEmailsApiGetSmtpTemplateGet /smtp/templates/{templateId}Returns the template information
TransactionalEmailsApiGetSmtpTemplatesGet /smtp/templatesGet the list of email templates
TransactionalEmailsApiGetTransacBlockedContactsGet /smtp/blockedContactsGet the list of blocked or unsubscribed transactional contacts
TransactionalEmailsApiGetTransacEmailContentGet /smtp/emails/{uuid}Get the personalized content of a sent transactional email
TransactionalEmailsApiGetTransacEmailsListGet /smtp/emailsGet the list of transactional emails on the basis of allowed filters
TransactionalEmailsApiSendTestTemplatePost /smtp/templates/{templateId}/sendTestSend a template to your test list
TransactionalEmailsApiSendTransacEmailPost /smtp/emailSend a transactional email
TransactionalEmailsApiSmtpBlockedContactsEmailDeleteDelete /smtp/blockedContacts/{email}Unblock or resubscribe a transactional contact
TransactionalEmailsApiSmtpLogMessageIdDeleteDelete /smtp/log/{messageId}Delete an SMTP transactional log
TransactionalEmailsApiUpdateSmtpTemplatePut /smtp/templates/{templateId}Update an email template
TransactionalSMSApiGetSmsEventsGet /transactionalSMS/statistics/eventsGet all your SMS activity (unaggregated events)
TransactionalSMSApiGetTransacAggregatedSmsReportGet /transactionalSMS/statistics/aggregatedReportGet your SMS activity aggregated over a period of time
TransactionalSMSApiGetTransacSmsReportGet /transactionalSMS/statistics/reportsGet your SMS activity aggregated per day
TransactionalSMSApiSendTransacSmsPost /transactionalSMS/smsSend SMS message to a mobile number
WebhooksApiCreateWebhookPost /webhooksCreate a webhook
WebhooksApiDeleteWebhookDelete /webhooks/{webhookId}Delete a webhook
WebhooksApiGetWebhookGet /webhooks/{webhookId}Get a webhook details
WebhooksApiGetWebhooksGet /webhooksGet all webhooks
WebhooksApiUpdateWebhookPut /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]

# Packages

No description provided by the author