apiv3-go-library

module
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2021 License: MIT

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

If the Golang package is hosted on Github, you can install directly from Github

go get github.com/GIT_USER_ID/GIT_REPO_ID.git

Put the package under your project folder and add the following in import:

import "./lib"

Getting Started

Please follow the installation procedure and then run the following:

package main
import (
	"fmt"
	"context"
     sib_api_v3_sdk "./lib"
)

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

	sib := sib_api_v3_sdk.NewAPIClient(cli.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
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 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
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
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
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
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 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 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 SendTemplate Post /smtp/templates/{templateId}/send Send a template
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

contact@sendinblue.com

Directories

Path Synopsis
* SendinBlue API * * SendinBlue provide a RESTFul API that can be used with any languages.
* SendinBlue API * * SendinBlue provide a RESTFul API that can be used with any languages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL