2.0.2 • Published 7 years ago

sendinblue-apiv3 v2.0.2

Weekly downloads
290
License
ISC
Repository
github
Last release
7 years ago

SendinBlue's API v3 Node.js 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. It supports promises.

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

This library is automatically generated by the Swagger Codegen project and is reviewed and maintained by SendinBlue:

  • API version: 3.0.0
  • Package version: 2.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

The following recommended installation requires npm. If you are unfamiliar with npm, see the npm docs.

Then install it via:

npm install sendinblue-apiv3 --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your sendinblue-apiv3 from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('sendinblue-apiv3') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/sendinblue/APIv3-nodejs-library then install it via:

    npm install sendinblue/APIv3-nodejs-library --save

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var SendinBlueApi = require('sendinblue-apiv3');

var defaultClient = SendinBlueApi.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = "YOUR API KEY"

var api = new SendinBlueApi.AccountApi()
api.getAccount().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

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

ClassMethodHTTP requestDescription
SendinBlueApi.AccountApigetAccountGET /accountGet your account informations, plans and credits details
SendinBlueApi.AttributesApicreateAttributePOST /contacts/attributesCreates contact attributes
SendinBlueApi.AttributesApideleteAttributeDELETE /contacts/attributes/{attributeId}Deletes an attribute
SendinBlueApi.AttributesApigetAttributesGET /contacts/attributesLists all attributes
SendinBlueApi.ContactsApiaddContactToListPOST /contacts/lists/{listId}/contacts/addAdd existing contacts to a list
SendinBlueApi.ContactsApicreateAttributePOST /contacts/attributesCreates contact attributes
SendinBlueApi.ContactsApicreateContactPOST /contactsCreate a contact
SendinBlueApi.ContactsApicreateFolderPOST /contacts/foldersCreate a folder
SendinBlueApi.ContactsApicreateListPOST /contacts/listsCreate a list
SendinBlueApi.ContactsApideleteAttributeDELETE /contacts/attributes/{attributeId}Deletes an attribute
SendinBlueApi.ContactsApideleteFolderDELETE /contacts/folders/{folderId}Delete a folder (and all its lists)
SendinBlueApi.ContactsApideleteListDELETE /contacts/lists/{listId}Delete a list
SendinBlueApi.ContactsApigetAttributesGET /contacts/attributesLists all attributes
SendinBlueApi.ContactsApigetContactInfoGET /contacts/{email}Retrieves contact informations
SendinBlueApi.ContactsApigetContactStatsGET /contacts/{email}/campaignStatsGet the campaigns statistics for a contact
SendinBlueApi.ContactsApigetContactsGET /contactsGet all the contacts
SendinBlueApi.ContactsApigetContactsFromListGET /contacts/lists/{listId}/contactsGet the contacts in a list
SendinBlueApi.ContactsApigetFolderGET /contacts/folders/{folderId}Returns folder details
SendinBlueApi.ContactsApigetFolderListsGET /contacts/folders/{folderId}/listsGet the lists in a folder
SendinBlueApi.ContactsApigetFoldersGET /contacts/foldersGet all the folders
SendinBlueApi.ContactsApigetListGET /contacts/lists/{listId}Get the details of a list
SendinBlueApi.ContactsApigetListsGET /contacts/listsGet all the lists
SendinBlueApi.ContactsApiimportContactsPOST /contacts/importImport contacts
SendinBlueApi.ContactsApiremoveContactToListPOST /contacts/lists/{listId}/contacts/removeRemove existing contacts from a list
SendinBlueApi.ContactsApirequestContactExportPOST /contacts/exportExport contacts
SendinBlueApi.ContactsApiupdateContactPUT /contacts/{email}Updates a contact
SendinBlueApi.ContactsApiupdateFolderPUT /contacts/folders/{folderId}Update a contact folder
SendinBlueApi.ContactsApiupdateListPUT /contacts/lists/{listId}Update a list
SendinBlueApi.EmailCampaignsApicreateEmailCampaignPOST /emailCampaignsCreate an email campaign
SendinBlueApi.EmailCampaignsApideleteEmailCampaignsDELETE /emailCampaigns/{campaignId}Delete an email campaign
SendinBlueApi.EmailCampaignsApiemailExportRecipientsPOST /emailCampaigns/{campaignId}/exportRecipientsExport the recipients of a campaign
SendinBlueApi.EmailCampaignsApigetEmailCampaignGET /emailCampaigns/{campaignId}Get campaign informations
SendinBlueApi.EmailCampaignsApigetEmailCampaignsGET /emailCampaignsReturn all your created campaigns
SendinBlueApi.EmailCampaignsApisendEmailCampaignNowPOST /emailCampaigns/{campaignId}/sendNowSend an email campaign id of the campaign immediately
SendinBlueApi.EmailCampaignsApisendReportPOST /emailCampaigns/{campaignId}/sendReportSend the report of a campaigns
SendinBlueApi.EmailCampaignsApisendTestEmailPOST /emailCampaigns/{campaignId}/sendTestSend an email campaign to your test list
SendinBlueApi.EmailCampaignsApiupdateCampaignStatusPUT /emailCampaigns/{campaignId}/statusUpdate a campaign status
SendinBlueApi.EmailCampaignsApiupdateEmailCampaignsPUT /emailCampaigns/{campaignId}Update a campaign
SendinBlueApi.FoldersApicreateFolderPOST /contacts/foldersCreate a folder
SendinBlueApi.FoldersApideleteFolderDELETE /contacts/folders/{folderId}Delete a folder (and all its lists)
SendinBlueApi.FoldersApigetFolderGET /contacts/folders/{folderId}Returns folder details
SendinBlueApi.FoldersApigetFolderListsGET /contacts/folders/{folderId}/listsGet the lists in a folder
SendinBlueApi.FoldersApigetFoldersGET /contacts/foldersGet all the folders
SendinBlueApi.FoldersApiupdateFolderPUT /contacts/folders/{folderId}Update a contact folder
SendinBlueApi.ListsApiaddContactToListPOST /contacts/lists/{listId}/contacts/addAdd existing contacts to a list
SendinBlueApi.ListsApicreateListPOST /contacts/listsCreate a list
SendinBlueApi.ListsApideleteListDELETE /contacts/lists/{listId}Delete a list
SendinBlueApi.ListsApigetContactsFromListGET /contacts/lists/{listId}/contactsGet the contacts in a list
SendinBlueApi.ListsApigetFolderListsGET /contacts/folders/{folderId}/listsGet the lists in a folder
SendinBlueApi.ListsApigetListGET /contacts/lists/{listId}Get the details of a list
SendinBlueApi.ListsApigetListsGET /contacts/listsGet all the lists
SendinBlueApi.ListsApiremoveContactToListPOST /contacts/lists/{listId}/contacts/removeRemove existing contacts from a list
SendinBlueApi.ListsApiupdateListPUT /contacts/lists/{listId}Update a list
SendinBlueApi.ProcessApigetProcessGET /processes/{processId}Return the informations for a process
SendinBlueApi.ProcessApigetProcessesGET /processesReturn all the processes for your account
SendinBlueApi.ResellerApiaddCreditsPOST /reseller/children/{childId}/credits/addAdd Email and/or SMS credits to a specific child account
SendinBlueApi.ResellerApiassociateIpToChildPOST /reseller/children/{childId}/ips/associateAssociate a dedicated IP to the child
SendinBlueApi.ResellerApicreateResellerChildPOST /reseller/childrenCreates a reseller child
SendinBlueApi.ResellerApideleteResellerChildDELETE /reseller/children/{childId}Deletes a single reseller child based on the childId supplied
SendinBlueApi.ResellerApidissociateIpFromChildPOST /reseller/children/{childId}/ips/dissociateDissociate a dedicated IP to the child
SendinBlueApi.ResellerApigetChildInfoGET /reseller/children/{childId}Gets the info about a specific child account
SendinBlueApi.ResellerApigetResellerChildsGET /reseller/childrenGets the list of all reseller's children accounts
SendinBlueApi.ResellerApiremoveCreditsPOST /reseller/children/{childId}/credits/removeRemove Email and/or SMS credits from a specific child account
SendinBlueApi.ResellerApiupdateResellerChildPUT /reseller/children/{childId}Updates infos of reseller's child based on the childId supplied
SendinBlueApi.SMSCampaignsApicreateSMSCampaignPOST /smsCampaignsCreates a SMS campaign
SendinBlueApi.SMSCampaignsApideleteSMSCampaignsDELETE /smsCampaigns/{campaignId}Delete the SMS campaign
SendinBlueApi.SMSCampaignsApigetSMSCampaignsGET /smsCampaignsReturns the informations for all your created SMS campaigns
SendinBlueApi.SMSCampaignsApigetSmsCampaignGET /smsCampaigns/{campaignId}Get a SMS campaign
SendinBlueApi.SMSCampaignsApirequestSMSRecipientExportPOST /smsCampaigns/{campaignId}/exportRecipientsExports the recipients of the specified campaign.
SendinBlueApi.SMSCampaignsApisendSMSCampaignNowPOST /smsCampaigns/{campaignId}/sendNowSend your SMS campaign immediately
SendinBlueApi.SMSCampaignsApisendSMSReportPOST /smsCampaigns/{campaignId}/sendReportSend report of SMS campaigns
SendinBlueApi.SMSCampaignsApisendTestSmsPOST /smsCampaigns/{campaignId}/sendTestSend an SMS
SendinBlueApi.SMSCampaignsApiupdateSMSCampaignStatusPUT /smsCampaigns/{campaignId}/statusUpdate the campaign status
SendinBlueApi.SMSCampaignsApiupdateSmsCampaignPUT /smsCampaigns/{campaignId}Updates a SMS campaign
SendinBlueApi.SMTPApicreateSmtpTemplatePOST /smtp/templatesCreate an smtp template
SendinBlueApi.SMTPApideleteHardbouncesPOST /smtp/deleteHardbouncesDelete hardbounces
SendinBlueApi.SMTPApigetAggregatedSmtpReportGET /smtp/statistics/aggregatedReportGet your SMTP activity aggregated over a period of time
SendinBlueApi.SMTPApigetEmailEventReportGET /smtp/statistics/eventsGet all your SMTP activity (unaggregated events)
SendinBlueApi.SMTPApigetSmtpReportGET /smtp/statistics/reportsGet your SMTP activity aggregated per day
SendinBlueApi.SMTPApigetSmtpTemplateGET /smtp/templates/{templateId}Returns the template informations
SendinBlueApi.SMTPApigetSmtpTemplatesGET /smtp/templatesGet the list of SMTP templates
SendinBlueApi.SMTPApisendTemplatePOST /smtp/templates/{templateId}/sendSend a template
SendinBlueApi.SMTPApisendTestTemplatePOST /smtp/templates/{templateId}/sendTestSend a template to your test list
SendinBlueApi.SMTPApisendTransacEmailPOST /smtp/emailSend a transactional email
SendinBlueApi.SMTPApiupdateSmtpTemplatePUT /smtp/templates/{templateId}Updates an smtp templates
SendinBlueApi.SendersApicreateSenderPOST /sendersCreate a new sender
SendinBlueApi.SendersApideleteSenderDELETE /senders/{senderId}Delete a sender
SendinBlueApi.SendersApigetIpsGET /senders/ipsReturn all the dedicated IPs for your account
SendinBlueApi.SendersApigetIpsFromSenderGET /senders/{senderId}/ipsReturn all the dedicated IPs for a sender
SendinBlueApi.SendersApigetSendersGET /sendersGet the list of all your senders
SendinBlueApi.SendersApiupdateSenderPUT /senders/{senderId}Update a sender
SendinBlueApi.TransactionalSMSApigetSmsEventsGET /transactionalSMS/statistics/eventsGet all the SMS activity (unaggregated events)
SendinBlueApi.TransactionalSMSApigetTransacAggregatedSmsReportGET /transactionalSMS/statistics/aggregatedReportGet your SMS activity aggregated over a period of time
SendinBlueApi.TransactionalSMSApigetTransacSmsReportGET /transactionalSMS/statistics/reportsGet your SMS activity aggregated per day
SendinBlueApi.TransactionalSMSApisendTransacSmsPOST /transactionalSMS/smsSend the SMS campaign to the specified mobile number
SendinBlueApi.WebhooksApicreateWebhookPOST /webhooksCreate a webhook
SendinBlueApi.WebhooksApideleteWebhookDELETE /webhooks/{webhookId}Delete a webhook
SendinBlueApi.WebhooksApigetWebhookGET /webhooks/{webhookId}Get a webhook details
SendinBlueApi.WebhooksApigetWebhooksGET /webhooksGet all webhooks
SendinBlueApi.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

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.

2.0.2

7 years ago

2.0.1

7 years ago

1.0.4

7 years ago