Skip to content
SendinBlue's API v3 Node.js Library
JavaScript
Branch: master
Clone or download
ekta-slit Merge pull request #61 from sendinblue/feature_update-wrap_AP-408
New reseller route to update settings of reseller's child account
Latest commit 08bbed7 May 27, 2019

README.md

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: 7.x.x
  • 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 sib-api-v3-sdk --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 sib-api-v3-sdk from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('sib-api-v3-sdk') 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 SibApiV3Sdk = require('sib-api-v3-sdk');

var defaultClient = SibApiV3Sdk.ApiClient.instance;

// Configure API key authorization: api-key
var apiKey = defaultClient.authentications['api-key'];
apiKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix['api-key'] = "Token"

// Configure API key authorization: partner-key
var partnerKey = defaultClient.authentications['partner-key'];
partnerKey.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.apiKeyPrefix['partner-key'] = "Token"

var api = new SibApiV3Sdk.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

Class Method HTTP request Description
SibApiV3Sdk.AccountApi getAccount GET /account Get your account informations, plans and credits details
SibApiV3Sdk.AttributesApi createAttribute POST /contacts/attributes/{attributeCategory}/{attributeName} Creates contact attribute
SibApiV3Sdk.AttributesApi deleteAttribute DELETE /contacts/attributes/{attributeCategory}/{attributeName} Deletes an attribute
SibApiV3Sdk.AttributesApi getAttributes GET /contacts/attributes Lists all attributes
SibApiV3Sdk.AttributesApi updateAttribute PUT /contacts/attributes/{attributeCategory}/{attributeName} Updates contact attribute
SibApiV3Sdk.ContactsApi addContactToList POST /contacts/lists/{listId}/contacts/add Add existing contacts to a list
SibApiV3Sdk.ContactsApi createAttribute POST /contacts/attributes/{attributeCategory}/{attributeName} Creates contact attribute
SibApiV3Sdk.ContactsApi createContact POST /contacts Create a contact
SibApiV3Sdk.ContactsApi createFolder POST /contacts/folders Create a folder
SibApiV3Sdk.ContactsApi createList POST /contacts/lists Create a list
SibApiV3Sdk.ContactsApi deleteAttribute DELETE /contacts/attributes/{attributeCategory}/{attributeName} Deletes an attribute
SibApiV3Sdk.ContactsApi deleteContact DELETE /contacts/{email} Deletes a contact
SibApiV3Sdk.ContactsApi deleteFolder DELETE /contacts/folders/{folderId} Delete a folder (and all its lists)
SibApiV3Sdk.ContactsApi deleteList DELETE /contacts/lists/{listId} Delete a list
SibApiV3Sdk.ContactsApi getAttributes GET /contacts/attributes Lists all attributes
SibApiV3Sdk.ContactsApi getContactInfo GET /contacts/{email} Retrieves contact informations
SibApiV3Sdk.ContactsApi getContactStats GET /contacts/{email}/campaignStats Get the campaigns statistics for a contact
SibApiV3Sdk.ContactsApi getContacts GET /contacts Get all the contacts
SibApiV3Sdk.ContactsApi getContactsFromList GET /contacts/lists/{listId}/contacts Get the contacts in a list
SibApiV3Sdk.ContactsApi getFolder GET /contacts/folders/{folderId} Returns folder details
SibApiV3Sdk.ContactsApi getFolderLists GET /contacts/folders/{folderId}/lists Get the lists in a folder
SibApiV3Sdk.ContactsApi getFolders GET /contacts/folders Get all the folders
SibApiV3Sdk.ContactsApi getList GET /contacts/lists/{listId} Get the details of a list
SibApiV3Sdk.ContactsApi getLists GET /contacts/lists Get all the lists
SibApiV3Sdk.ContactsApi importContacts POST /contacts/import Import contacts
SibApiV3Sdk.ContactsApi removeContactFromList POST /contacts/lists/{listId}/contacts/remove Remove existing contacts from a list
SibApiV3Sdk.ContactsApi requestContactExport POST /contacts/export Export contacts
SibApiV3Sdk.ContactsApi updateAttribute PUT /contacts/attributes/{attributeCategory}/{attributeName} Updates contact attribute
SibApiV3Sdk.ContactsApi updateContact PUT /contacts/{email} Updates a contact
SibApiV3Sdk.ContactsApi updateFolder PUT /contacts/folders/{folderId} Update a contact folder
SibApiV3Sdk.ContactsApi updateList PUT /contacts/lists/{listId} Update a list
SibApiV3Sdk.EmailCampaignsApi createEmailCampaign POST /emailCampaigns Create an email campaign
SibApiV3Sdk.EmailCampaignsApi deleteEmailCampaign DELETE /emailCampaigns/{campaignId} Delete an email campaign
SibApiV3Sdk.EmailCampaignsApi emailExportRecipients POST /emailCampaigns/{campaignId}/exportRecipients Export the recipients of a campaign
SibApiV3Sdk.EmailCampaignsApi getEmailCampaign GET /emailCampaigns/{campaignId} Get campaign informations
SibApiV3Sdk.EmailCampaignsApi getEmailCampaigns GET /emailCampaigns Return all your created campaigns
SibApiV3Sdk.EmailCampaignsApi sendEmailCampaignNow POST /emailCampaigns/{campaignId}/sendNow Send an email campaign id of the campaign immediately
SibApiV3Sdk.EmailCampaignsApi sendReport POST /emailCampaigns/{campaignId}/sendReport Send the report of a campaigns
SibApiV3Sdk.EmailCampaignsApi sendTestEmail POST /emailCampaigns/{campaignId}/sendTest Send an email campaign to your test list
SibApiV3Sdk.EmailCampaignsApi updateCampaignStatus PUT /emailCampaigns/{campaignId}/status Update a campaign status
SibApiV3Sdk.EmailCampaignsApi updateEmailCampaign PUT /emailCampaigns/{campaignId} Update a campaign
SibApiV3Sdk.FoldersApi createFolder POST /contacts/folders Create a folder
SibApiV3Sdk.FoldersApi deleteFolder DELETE /contacts/folders/{folderId} Delete a folder (and all its lists)
SibApiV3Sdk.FoldersApi getFolder GET /contacts/folders/{folderId} Returns folder details
SibApiV3Sdk.FoldersApi getFolderLists GET /contacts/folders/{folderId}/lists Get the lists in a folder
SibApiV3Sdk.FoldersApi getFolders GET /contacts/folders Get all the folders
SibApiV3Sdk.FoldersApi updateFolder PUT /contacts/folders/{folderId} Update a contact folder
SibApiV3Sdk.ListsApi addContactToList POST /contacts/lists/{listId}/contacts/add Add existing contacts to a list
SibApiV3Sdk.ListsApi createList POST /contacts/lists Create a list
SibApiV3Sdk.ListsApi deleteList DELETE /contacts/lists/{listId} Delete a list
SibApiV3Sdk.ListsApi getContactsFromList GET /contacts/lists/{listId}/contacts Get the contacts in a list
SibApiV3Sdk.ListsApi getFolderLists GET /contacts/folders/{folderId}/lists Get the lists in a folder
SibApiV3Sdk.ListsApi getList GET /contacts/lists/{listId} Get the details of a list
SibApiV3Sdk.ListsApi getLists GET /contacts/lists Get all the lists
SibApiV3Sdk.ListsApi removeContactFromList POST /contacts/lists/{listId}/contacts/remove Remove existing contacts from a list
SibApiV3Sdk.ListsApi updateList PUT /contacts/lists/{listId} Update a list
SibApiV3Sdk.ProcessApi getProcess GET /processes/{processId} Return the informations for a process
SibApiV3Sdk.ProcessApi getProcesses GET /processes Return all the processes for your account
SibApiV3Sdk.ResellerApi addCredits POST /reseller/children/{childAuthKey}/credits/add Add Email and/or SMS credits to a specific child account
SibApiV3Sdk.ResellerApi associateIpToChild POST /reseller/children/{childAuthKey}/ips/associate Associate a dedicated IP to the child
SibApiV3Sdk.ResellerApi createChildDomain POST /reseller/children/{childAuthKey}/domains Creates a domain for a child account
SibApiV3Sdk.ResellerApi createResellerChild POST /reseller/children Creates a reseller child
SibApiV3Sdk.ResellerApi deleteChildDomain DELETE /reseller/children/{childAuthKey}/domains/{domainName} Deletes the sender domain of the reseller child based on the childAuthKey and domainName passed
SibApiV3Sdk.ResellerApi deleteResellerChild DELETE /reseller/children/{childAuthKey} Deletes a single reseller child based on the childAuthKey supplied
SibApiV3Sdk.ResellerApi dissociateIpFromChild POST /reseller/children/{childAuthKey}/ips/dissociate Dissociate a dedicated IP to the child
SibApiV3Sdk.ResellerApi getChildDomains GET /reseller/children/{childAuthKey}/domains Gets all the sender domains of a specific child account
SibApiV3Sdk.ResellerApi getChildInfo GET /reseller/children/{childAuthKey} Gets the info about a specific child account
SibApiV3Sdk.ResellerApi getResellerChilds GET /reseller/children Gets the list of all reseller's children accounts
SibApiV3Sdk.ResellerApi getSsoToken GET /reseller/children/{childAuthKey}/auth Get session token to access Sendinblue (SSO)
SibApiV3Sdk.ResellerApi removeCredits POST /reseller/children/{childAuthKey}/credits/remove Remove Email and/or SMS credits from a specific child account
SibApiV3Sdk.ResellerApi updateChildAccountStatus PUT /reseller/children/{childAuthKey}/accountStatus Updates infos of reseller's child account status based on the childAuthKey supplied
SibApiV3Sdk.ResellerApi updateChildDomain PUT /reseller/children/{childAuthKey}/domains/{domainName} Updates the sender domain of reseller's child based on the childAuthKey and domainName passed
SibApiV3Sdk.ResellerApi updateResellerChild PUT /reseller/children/{childAuthKey} Updates infos of reseller's child based on the childAuthKey supplied
SibApiV3Sdk.SMSCampaignsApi createSmsCampaign POST /smsCampaigns Creates an SMS campaign
SibApiV3Sdk.SMSCampaignsApi deleteSmsCampaign DELETE /smsCampaigns/{campaignId} Delete the SMS campaign
SibApiV3Sdk.SMSCampaignsApi getSmsCampaign GET /smsCampaigns/{campaignId} Get an SMS campaign
SibApiV3Sdk.SMSCampaignsApi getSmsCampaigns GET /smsCampaigns Returns the informations for all your created SMS campaigns
SibApiV3Sdk.SMSCampaignsApi requestSmsRecipientExport POST /smsCampaigns/{campaignId}/exportRecipients Exports the recipients of the specified campaign.
SibApiV3Sdk.SMSCampaignsApi sendSmsCampaignNow POST /smsCampaigns/{campaignId}/sendNow Send your SMS campaign immediately
SibApiV3Sdk.SMSCampaignsApi sendSmsReport POST /smsCampaigns/{campaignId}/sendReport Send report of SMS campaigns
SibApiV3Sdk.SMSCampaignsApi sendTestSms POST /smsCampaigns/{campaignId}/sendTest Send an SMS
SibApiV3Sdk.SMSCampaignsApi updateSmsCampaign PUT /smsCampaigns/{campaignId} Updates an SMS campaign
SibApiV3Sdk.SMSCampaignsApi updateSmsCampaignStatus PUT /smsCampaigns/{campaignId}/status Update the campaign status
SibApiV3Sdk.SMTPApi createSmtpTemplate POST /smtp/templates Create an smtp template
SibApiV3Sdk.SMTPApi deleteHardbounces POST /smtp/deleteHardbounces Delete hardbounces
SibApiV3Sdk.SMTPApi deleteSmtpTemplate DELETE /smtp/templates/{templateId} Delete an inactive smtp template
SibApiV3Sdk.SMTPApi getAggregatedSmtpReport GET /smtp/statistics/aggregatedReport Get your SMTP activity aggregated over a period of time
SibApiV3Sdk.SMTPApi getEmailEventReport GET /smtp/statistics/events Get all your SMTP activity (unaggregated events)
SibApiV3Sdk.SMTPApi getSmtpReport GET /smtp/statistics/reports Get your SMTP activity aggregated per day
SibApiV3Sdk.SMTPApi getSmtpTemplate GET /smtp/templates/{templateId} Returns the template informations
SibApiV3Sdk.SMTPApi getSmtpTemplates GET /smtp/templates Get the list of SMTP templates
SibApiV3Sdk.SMTPApi sendTemplate POST /smtp/templates/{templateId}/send Send a template
SibApiV3Sdk.SMTPApi sendTestTemplate POST /smtp/templates/{templateId}/sendTest Send a template to your test list
SibApiV3Sdk.SMTPApi sendTransacEmail POST /smtp/email Send a transactional email
SibApiV3Sdk.SMTPApi updateSmtpTemplate PUT /smtp/templates/{templateId} Updates an smtp templates
SibApiV3Sdk.SendersApi createSender POST /senders Create a new sender
SibApiV3Sdk.SendersApi deleteSender DELETE /senders/{senderId} Delete a sender
SibApiV3Sdk.SendersApi getIps GET /senders/ips Return all the dedicated IPs for your account
SibApiV3Sdk.SendersApi getIpsFromSender GET /senders/{senderId}/ips Return all the dedicated IPs for a sender
SibApiV3Sdk.SendersApi getSenders GET /senders Get the list of all your senders
SibApiV3Sdk.SendersApi updateSender PUT /senders/{senderId} Update a sender
SibApiV3Sdk.TransactionalSMSApi getSmsEvents GET /transactionalSMS/statistics/events Get all the SMS activity (unaggregated events)
SibApiV3Sdk.TransactionalSMSApi getTransacAggregatedSmsReport GET /transactionalSMS/statistics/aggregatedReport Get your SMS activity aggregated over a period of time
SibApiV3Sdk.TransactionalSMSApi getTransacSmsReport GET /transactionalSMS/statistics/reports Get your SMS activity aggregated per day
SibApiV3Sdk.TransactionalSMSApi sendTransacSms POST /transactionalSMS/sms Send the SMS campaign to the specified mobile number
SibApiV3Sdk.WebhooksApi createWebhook POST /webhooks Create a webhook
SibApiV3Sdk.WebhooksApi deleteWebhook DELETE /webhooks/{webhookId} Delete a webhook
SibApiV3Sdk.WebhooksApi getWebhook GET /webhooks/{webhookId} Get a webhook details
SibApiV3Sdk.WebhooksApi getWebhooks GET /webhooks Get all webhooks
SibApiV3Sdk.WebhooksApi updateWebhook PUT /webhooks/{webhookId} Update a webhook

Documentation for Models

Documentation for Authorization

api-key

The API key should be passed in the request headers as api-key for authentication.

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

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

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

You can’t perform that action at this time.