Skip to content

v6.0.1

Latest

Choose a tag to compare

@mourraille mourraille released this 15 May 08:20
dd2cccd

v6.0.1

First stable release of the v6 line. This is a major release with breaking changes — see the migration notes below before upgrading. v5.x remains supported and continues to receive wire-compatibility fixes.

npm install @getbrevo/brevo@^6.0.1

Why this release

Most of the breaking changes in v6 come from an internal effort at Brevo to make our API endpoints, parameters and models more self-descriptive. The goal is to make the public surface easier to read at a glance — both for developers and for AI agents working against the Brevo API — so that names, shapes and required fields convey intent without needing to cross-reference external docs. Concretely, this means consistent camelCase parameters, payload wrappers that reflect what the endpoint actually does (e.g. { events: [...] }), filter keys that match the wire format, and model fields renamed or removed where the previous names were ambiguous or misleading.

We're aware that renaming costs callers a one-time migration, and we've kept v5.x supported so you can adopt v6 on your own timeline.

⚠️ Breaking changes

Companies — getCompanies filter parameter renamed

  • client.companies.getCompanies({ filters }) — the filters parameter is renamed to the bracketed literal "filters[attributes.name]" to match the wire format.
  • The old filters name still compiles but the filter is silently dropped server-side and you get an unfiltered list. Audit every call site.

Events — createBatchEvents payload shape changed

  • client.event.createBatchEvents now wraps events in { events: [...] } instead of accepting a raw array.

Balance — getActiveBalancesApi response and parameter rename

  • Response type replaced: BalanceLimitGetLoyaltyBalanceProgramsPidActiveBalanceResponse.
  • Request parameters renamed from snake_case to camelCase: contact_idcontactId, balance_definition_idbalanceDefinitionId, sort_fieldsortField.

Balance — getContactBalances requires balanceDefinitionId

  • balanceDefinitionId is now a required parameter.

CRM — getCrmTasktypes returns an array

  • client.tasks.getCrmTasktypes return type changed from a single object to GetCrmTasktypesResponseItem[].

Model fields removed

  • GetWebhook.channel
  • GetProcessResponseInfo.export
  • GetEventsList.events[].source
  • GetExtendedCampaignOverview.utmIDActive — replaced by utmID: number

Model fields renamed

  • ConversationsMessage.File.filenamename
  • ConversationsMessage.File.urllink
  • SendTransacSms.tag is now string | string[] (previously an object { field?: ... })

Now-required fields

  • GetContactDetails.whatsappBlacklisted
  • Note.text
  • Task.date

Added

  • BrevoClient auth option — inject a custom AuthProvider for advanced auth scenarios (OAuth, dynamic tokens, key rotation). The existing apiKey constructor option continues to work unchanged.
  • New optional fields and filters across contacts.createContact, contacts.updateContact, emailCampaigns.getEmailCampaigns, ecommerce.getProducts, and several other endpoints.

Migration

See the Upgrading from v5.x guide for full migration details, including a one-line rollback pin if you need to hold on v5.x temporarily.

Documentation

What's Changed

Full Changelog: v5.0.4...v6.0.0

What's Changed

Full Changelog: v3.0.1...v6.0.0