sib-api-v3-typescript

SendinBlue's API v3 client

Showing:

Popularity

Downloads/wk

4.8K

GitHub Stars

14

Maintenance

Last Commit

1mo ago

Contributors

4

Package

Dependencies

3

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Categories

Readme

APIv3-typescript-library

SendinBlue's API v3 TypeScript-Node 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.

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/client --save
# or
yarn add @sendinblue/client

Getting Started

Once you have installed the node module in your project, you can execute the following sample code JS code :

const SibApiV3Sdk = require('@sendinblue/client')

const apiInstance = new SibApiV3Sdk.AccountApi()

// Configure API key authorization: apiKey

apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY')

apiInstance.getAccount().then(
  function (data) {
    console.log('API called successfully. Returned data: ', data.body)
  },
  function (error) {
    console.error(error)
  }
)
const SibApiV3Sdk = require('@sendinblue/client')

const apiInstance = new SibApiV3Sdk.ContactsApi()

// Configure API key authorization: apiKey

apiInstance.setApiKey(SibApiV3Sdk.AccountApiApiKeys.apiKey, 'YOUR API KEY')

const limit = 10 // Number | Number of documents per page
const offset = 0 // Number | Index of the first document of the page

apiInstance.getLists(limit, offset).then(
  function (data) {
    console.log('API called successfully. Returned data: ', data.body)
    apiInstance.getAttributes().then(
      function (data) {
        console.log('API called successfully. Returned data: ', data.body)
      },
      function (error) {
        console.error(error)
      }
    )
  },
  function (error) {
    console.error(error)
  }
)

For more examples, refer the Endpoints Guide

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100