{"id":42252991,"url":"https://github.com/getbrevo/brevo-node","last_synced_at":"2026-04-02T13:26:28.542Z","repository":{"id":175209625,"uuid":"635212871","full_name":"getbrevo/brevo-node","owner":"getbrevo","description":"A fully-featured JavaScript API client to interact with Brevo.","archived":false,"fork":false,"pushed_at":"2026-02-13T16:39:22.000Z","size":2058,"stargazers_count":109,"open_issues_count":46,"forks_count":23,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-14T00:41:01.446Z","etag":null,"topics":["brevo","client","crm","emailing-service","nodejs"],"latest_commit_sha":null,"homepage":"https://developers.brevo.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getbrevo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-05-02T07:59:40.000Z","updated_at":"2026-02-13T16:38:44.000Z","dependencies_parsed_at":"2025-02-05T10:21:22.553Z","dependency_job_id":"99c00256-bb9b-4959-9e59-045835a67b61","html_url":"https://github.com/getbrevo/brevo-node","commit_stats":null,"previous_names":["getbrevo/brevo-node"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/getbrevo/brevo-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbrevo%2Fbrevo-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbrevo%2Fbrevo-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbrevo%2Fbrevo-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbrevo%2Fbrevo-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getbrevo","download_url":"https://codeload.github.com/getbrevo/brevo-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getbrevo%2Fbrevo-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29850155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brevo","client","crm","emailing-service","nodejs"],"created_at":"2026-01-27T05:15:59.351Z","updated_at":"2026-04-02T13:26:28.534Z","avatar_url":"https://github.com/getbrevo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [!WARNING]\n\u003e ## ⚠️ A New Version of this SDK is Available\n\u003e\n\u003e **[brevo-node v5](https://github.com/getbrevo/brevo-node/tree/v5)** is now the actively developed version of this library, built on a modern, unified client architecture.\n\u003e\n\u003e This **v3.x** version will continue to receive **critical security updates only** — no new features will be added. We strongly recommend migrating to the new version at your earliest convenience.\n\u003e\n\u003e 📖 **[View the Migration Guide →](https://developers.brevo.com/docs/api-clients/node-js#migration-from-v3x)**\n\n---\n## Overview\n\nBrevo's API exposes the entire Brevo features via a standardized programmatic interface. Please refer to the full [documentation](https://developers.brevo.com) to see all the supported operations.\n\nBrevo's API matches the [OpenAPI v2 definition](https://www.openapis.org/). The specification can be downloaded [here](https://api.brevo.com/v3/swagger_definition_v3.yml).\n\nOur current library is not fully compatible with all modern Node.js and TypeScript environments. To help you integrate Brevo into your applications, we're providing both plain Node.js and TypeScript-specific implementation approaches below while we work on the next generation of our SDK.\n\n## Table of Contents\n\n- [Node.js Implementation](#nodejs-implementation)\n  - [Send Transactional Email](#send-transactional-email)\n  - [Create Contact](#create-contact)\n- [TypeScript Implementation](#typescript-implementation)\n  - [Send Transactional Email](#send-transactional-email-1)\n  - [Create Contact](#create-contact-1)\n- [Support](#support)\n- [License](#license)\n\n## Node.js Implementation\n\n### Send Transactional Email\n\n#### Installation\n\n```bash\nnpm i @getbrevo/brevo^3.0.1 --save\n```\n\n#### Import packages\n\n```javascript\nimport { TransactionalEmailsApi, SendSmtpEmail } from \"@getbrevo/brevo^3.0.1\";\n```\n\n#### Instantiate API with your credentials\n\n```javascript\nlet emailAPI = new TransactionalEmailsApi();\nemailAPI.authentications.apiKey.apiKey = \"xkeysib-xxxxxxxxxxxxxxxxxxxxx\"\n```\n\n#### Build your message\n\n```javascript\nlet message = new SendSmtpEmail();\nmessage.subject = \"First email\";\nmessage.textContent = \"Hello world!\";\nmessage.sender = { name: \"John Doe\", email: \"john.doe@example.com\" };\nmessage.to = [{ email: \"jane.smith@example.com\", name: \"Jane Smith\" }];\n```\n\n#### Send the message\n\n```javascript\nemailAPI.sendTransacEmail(message)\n```\n\n#### (Optional) Log the response\n\n```javascript\nemailAPI.sendTransacEmail(message).then(res =\u003e {\n    console.log(JSON.stringify(res.body));\n}).catch(err =\u003e {\n    console.error(\"Error sending email:\", err.body);\n});\n```\n\n### Create Contact\n\n#### Installation\n\n```bash\nnpm i @getbrevo/brevo^3.0.1 --save\n```\n\n#### Import packages\n\n```javascript\nimport { CreateContact, ContactsApi } from \"@getbrevo/brevo^3.0.1\";\n```\n\n#### Instantiate API with your credentials\n\n```javascript\nlet contactAPI = new ContactsApi();\ncontactAPI.authentications.apiKey.apiKey = \"xkeysib-xxxxxx\"\n```\n\n#### Build your contact\n\n```javascript\nlet contact = new CreateContact();\ncontact.email = \"alice.johnson@example.com\";\ncontact.attributes = {\n  FIRSTNAME: \"Alice\",\n  LASTNAME: \"Johnson\",\n};\n```\n\n#### Create the contact\n\n```javascript\ncontactAPI.createContact(contact).then(res =\u003e {\n  console.log(JSON.stringify(res.body));\n}).catch(err =\u003e {\n  console.error(\"Error creating contact:\", err.body);\n});\n```\n\n## TypeScript Implementation\n\n### Recommended tsconfig.json Settings\n\nWe recommend using the following TypeScript configuration for optimal compatibility:\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"es2020\",\n    \"module\": \"commonjs\",\n    \"outDir\": \"dist\",\n    \"rootDir\": \"src\",\n    \"strict\": true,\n    \"esModuleInterop\": true,\n    \"skipLibCheck\": true\n  },\n  \"include\": [\"src\"]\n}\n```\n\n### Send Transactional Email\n\n#### Installation\n\n```bash\nnpm i @getbrevo/brevo^3.0.1 --save\n```\n\n#### Import packages\n\n```typescript\nimport { TransactionalEmailsApi, SendSmtpEmail } from \"@getbrevo/brevo^3.0.1\";\n```\n\n#### Instantiate API with your credentials\n\n```typescript\nlet emailAPI = new TransactionalEmailsApi();\n(emailAPI as any).authentications.apiKey.apiKey = \"xkeysib-xxxxxxxxxxxxxxxxxxxxx\";\n```\n\n#### Build your message\n\n```typescript\nlet message = new SendSmtpEmail();\nmessage.subject = \"First email\";\nmessage.textContent = \"Hello world!\";\nmessage.sender = { name: \"Bob Wilson\", email: \"bob.wilson@example.com\" };\nmessage.to = [{ email: \"sarah.davis@example.com\", name: \"Sarah Davis\" }];\n```\n\n#### Send the message\n\n```typescript\nemailAPI.sendTransacEmail(message)\n```\n\n#### (Optional) Log the response\n\n```typescript\nemailAPI\n  .sendTransacEmail(message)\n  .then((res) =\u003e {\n    console.log(JSON.stringify(res.body));\n  })\n  .catch((err) =\u003e {\n    console.error(\"Error sending email:\", err.body);\n  });\n```\n\n### Create Contact\n\n#### Installation\n\n```bash\nnpm i @getbrevo/brevo^3.0.1 --save\n```\n\n#### Import packages\n\n```typescript\nimport { CreateContact, ContactsApi } from \"@getbrevo/brevo^3.0.1\";\n```\n\n#### Instantiate API with your credentials\n\n```typescript\nlet contactAPI = new ContactsApi();\n(contactAPI as any).authentications.apiKey.apiKey = \"xkeysib-xxxxxxxxx\"\n```\n\n#### Build your contact\n\n```typescript\nlet contact = new CreateContact();\ncontact.email = \"michael.brown@example.com\";\ncontact.attributes = {\n  FIRSTNAME: { value: \"Michael\" },\n  LASTNAME: { value: \"Brown\" },\n};\n```\n\n#### Create the contact\n\n```typescript\ncontactAPI.createContact(contact).then(res =\u003e {\n  console.log(JSON.stringify(res.body));\n}).catch(err =\u003e {\n  console.error(\"Error creating contact:\", err.body);\n});\n```\n\n# Concerning v3.0.0 and above:\n\u003e [!IMPORTANT]\n\u003e There has been a change in the usage of this library after v3.0.0 which is not backward compatible.\n\n### Installation\n\n```npm i @getbrevo/brevo^3.0.1 --save```\n\n### Import packages\n\n```import { CreateContact, ContactsApi } from \"@getbrevo/brevo^3.0.1\";```\n\n### Instantiate API with your credentials\n\n```\nlet contactAPI = new ContactsApi();\n(contactAPI as any).authentications.apiKey.apiKey = \"xkeysib-xxxxxxxxx\";\n```\n\n### Build your contact\n\n```let contact = new CreateContact();\ncontact.email = \"michael.brown@example.com\";\ncontact.attributes = {\n  FIRSTNAME: { value: \"Michael\" },\n  LASTNAME: { value: \"Brown\" }\n};\n```\n\n### Create the contact\n\n```contactAPI.createContact(contact).then(res =\u003e {\n  console.log(JSON.stringify(res.body));\n}).catch(err =\u003e {\n  console.error(\"Error creating contact:\", err.body);\n});\n```\n\n### Similar other examples:\n\n```typescript\n\nimport { TransactionalEmailsApi, TransactionalEmailsApiApiKeys } from '@getbrevo/brevo^3.0.1';\n\nconst transactionalEmailsApi = new TransactionalEmailsApi();\ntransactionalEmailsApi.setApiKey(TransactionalEmailsApiApiKeys.apiKey, 'xkeysib-API_KEY');\n\nasync function sendTransactionalEmail() {\n  try {\n    const result = await transactionalEmailsApi.sendTransacEmail({\n      to: [\n        { email: 'sampleemail@gmail.com', name: 'John doe' },\n      ],\n      subject: 'Hello from Brevo SDK!',\n      htmlContent: '\u003ch1\u003eThis is a transactional email sent using the Brevo SDK.\u003c/h1\u003e',\n      textContent: 'This is a transactional email sent using the Brevo SDK.',\n      sender: { email: 'sampleemail@gmail.com', name: 'John doe' },\n    });\n    console.log('Email sent! Message ID:', result.body.messageId);\n  } catch (error) {\n    console.error('Failed to send email:', error);\n  }\n}\n\nsendTransactionalEmail(); \n```\n\n```typescript\n\nimport { DealsApi, DealsApiApiKeys } from '@getbrevo/brevo^3.0.1';\n\nconst dealsApi = new DealsApi();\ndealsApi.setApiKey(DealsApiApiKeys.apiKey, 'xkeysib-YOUR_API_KEY');\n\nasync function getDeals() {\n  try {\n    const response = await dealsApi.crmDealsGet()\n    console.log('Deals info:', response.body);\n  } catch (error) {\n    console.error('Failed to get account info:', error);\n  }\n}\n\ngetDeals();\n```\n\n```typescript\n\nimport { AccountApi, AccountApiApiKeys } from '@getbrevo/brevo^3.0.1';\n\nconst accountApi = new AccountApi();\naccountApi.setApiKey(AccountApiApiKeys.apiKey, 'xkeysib-YOUR_API_KEY');\n\nasync function getAccount() {\n  try {\n    const response = await accountApi.getAccount();\n    console.log('Account info:', response.body);\n  } catch (error) {\n    console.error('Failed to get account info:', error);\n  }\n}\n\ngetAccount();\n```\n\n```typescript\n\nimport { ContactsApi, ContactsApiApiKeys } from '@getbrevo/brevo^3.0.1';\n\nconst contactsApi = new ContactsApi();\ncontactsApi.setApiKey(ContactsApiApiKeys.apiKey, 'xkeysib-YOUR_API_KEY');\n\nasync function getContacts(limit: number, offset: number) {\n  try {\n    const result = await contactsApi.getContacts(limit, offset);\n    console.log('Contacts:', result.body);\n  } catch (error) {\n    console.error('Failed to get contacts:', error);\n  }\n}\n\ngetContacts(10, 0); // Example: get first 10 contacts \n```\n\n\n## Support\n\nFor questions and support, please refer to our [documentation](https://developers.brevo.com) or contact our support team.\n\n## License\n\nThis SDK is distributed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetbrevo%2Fbrevo-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetbrevo%2Fbrevo-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetbrevo%2Fbrevo-node/lists"}