
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@groupcards/brevo
Advanced tools
Brevo's API v3 TypeScript-Node Library
Brevo's API exposes the entire Brevo 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.
Brevo's API matches the OpenAPI v2 definition. The specification can be downloaded here.
The following recommended installation requires npm. If you are unfamiliar with npm, see the npm docs.
Then install it via:
npm i @groupcards/brevo --save
# or
yarn add @groupcards/brevo
Once you have installed the node module in your project, you can execute the following sample code JS code :
import BrevoApi from "@groupcards/brevo";
const brevo = new BrevoApi({
headers: {
"api-key": "YOUR_API_KEY",
},
});
brevo.account
.getAccount()
.then((data) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error) => {
console.error(error);
});
import BrevoApi from "@groupcards/brevo";
const brevo = new BrevoApi({
headers: {
"api-key": "YOUR_API_KEY",
},
});
brevo.smtp
.sendTransacEmail({
subject: "My {{params.subject}}",
htmlContent:
"<html><body><h1>This is my first transactional email {{params.parameter}}</h1></body></html>",
sender: {
name: "John Doe",
email: "example@example.com",
},
to: [{ email: "example@example.com", name: "Jane Doe" }],
cc: [{ email: "example2@example2.com", name: "Janice Doe" }],
bcc: [{ email: "example@example.com", name: "John Doe" }],
replyTo: { email: "replyto@domain.com", name: "John Doe" },
headers: { "Some-Custom-Name": "unique-id-1234" },
params: { parameter: "My param value", subject: "New Subject" },
})
.then((data) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error) => {
console.error(error);
});
For more examples, refer the Endpoints Guide
Please refer to the CONTRIBUTING file.
FAQs
NodeJS client for @getbrevo/brevo
The npm package @groupcards/brevo receives a total of 337 weekly downloads. As such, @groupcards/brevo popularity was classified as not popular.
We found that @groupcards/brevo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.