PackageTrack
Sign in Get early access

getbrevo/brevo-php

Official PHP SDK for the Brevo API.

5.0.2 4.3M downloads/mo #1568 most downloaded on Packagist getbrevo/brevo-php

What this package is like to depend on

Last release 13 days ago

10 Aug 2026

Release timing varies

gaps range from 2 weeks to 4 months

Some releases are documented

notes for 9 of 31 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

32 releases · first in 2023

18 releases in the last 12 months

see the full history below

Release timeline

32 releases · May 2023 to Aug 2026
2024 2025 2026
Release Pre-release

Releases

latest 32
  1. 5.0.2 10 Aug 2026
    Release notes

    Added

    • Email Campaigns — UTM parameter customizationEmailCampaigns::createEmailCampaign() and EmailCampaigns::updateEmailCampaign() now accept optional utmCampaign, utmContent, and utmTerm fields to customize UTM tracking parameters.
    • Transactional Email — per-contact pixel tracking consentTransactionalEmails::sendTransacEmail() now accepts optional contactPixelTrackingConsent boolean field on individual recipient objects to control whether opens are tracked identifiably or anonymized.

    Backward-compatible patch release. No breaking changes.

    Open source →
  2. 5.0.1 03 Jul 2026
    Release notes

    PHP SDK v5.0.1

    What's New

    🔧 Bug Fix: Empty Object Serialization

    • Fix: JsonSerializableType now correctly serializes empty objects to {} instead of []
    • Resolves backend validation errors when sending empty optional/nested objects

    ✨ New Features: Consent Groups Management

    • List consent groups — GET /contacts/consent-groups
    • Create a consent group — POST /contacts/consent-groups
    • Get consent group details — GET /contacts/consent-groups/{id}
    • Update consent group — PUT /contacts/consent-groups/{id} (name, description, signup mode)
    • Delete consent group — DELETE /contacts/consent-groups/{id}

    📲 Extended Operations

    • Import contacts — POST /contacts/import now accepts optional consentGroupIds field to add imported contacts to specified consent groups
    • Get contact details — GET /contacts/{identifier} now returns consentGroups array showing subscription status (when feature enabled)

    💳 New Wallet Feature

    • Get pass installation URL — GET /wallet/passes/{passId}/installUrl/{contactId}
      • Generates per-contact wallet installation URLs
      • Enables sharing via email, SMS, or QR code for Apple Wallet/Google Wallet integration

    Bug Fixes

    • Fixed serialization of empty JsonSerializableType instances at the top level
    • Fixed serialization of empty nested objects within parent objects
    • Resolves backend validation failures from strict type checkers

    Compatibility

    • ✅ Backward compatible — no breaking changes
    • ✅ No method removals or signature changes
    • ✅ Public API unchanged

    Installation

    composer require getbrevo/brevo-php:^5.0.1
    Open source →
  3. v5.0.0-rc.1 15 May 2026 pre-release
    Release notes

    v5.0.0-rc.1

    Release candidate for the v5 line. This pre-release is published so adopters can validate the new surface against their integrations before v5.0.0 is tagged stable. It is not picked up by composer update automatically — opt in explicitly (see Installing this RC below).

    If no blocking issues surface within the soak window, this build will be promoted to v5.0.0 unchanged.

    composer require getbrevo/brevo-php:^5.0.0@RC

    Status

    • Stability: RC — API surface is frozen. Only critical regressions discovered during soak will be patched into an RC.2.
    • v4.x: remains supported and continues to receive wire-compatibility fixes.
    • Feedback welcome: please open an issue against getbrevo/brevo-php if you hit anything unexpected during migration. Tag with v5-rc.

    Why this release

    Most of the breaking changes in v5 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 parameter naming, payload wrappers that reflect what the endpoint actually does (e.g. CreateBatchEventsRequest), filter keys that match the wire format, model fields renamed or removed where the previous names were ambiguous, and tightened types (DateTime instead of string for dates, typed unions instead of generic arrays) so static analysis catches mistakes earlier.

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

    ⚠️ Breaking changes

    Companies — GetCompaniesRequest::filters renamed

    • filters is renamed to filtersAttributesName to match the wire format.
    • Existing code passing 'filters' => ... does not throw, but the filter is silently ignored server-side and the response is unfiltered. Audit every call site.

    Events — Event::createBatchEvents payload shape changed

    • First argument changed from array to a CreateBatchEventsRequest wrapper.

    Balance — getActiveBalancesApi response shape changed

    • Return type changed from ?BalanceLimit to ?GetLoyaltyBalanceProgramsPidActiveBalanceResponse (different shape).

    Balance — getContactBalances requires balanceDefinitionId

    • $request no longer defaults to empty; balanceDefinitionId is required.

    Balance — BeginTransactionRequest::eventTime type tightened

    • Type changed from ?string to ?DateTime. ISO strings now cause TypeError.

    CRM — Tasks::getAllTaskTypes returns an array

    • Return type changed from ?GetCrmTasktypesResponse (wrapper) to ?array<GetCrmTasktypesResponseItem>.

    Email campaigns — utmIdActive renamed

    • EmailCampaigns\GetEmailCampaignResponse::utmIdActive renamed to utmId (wire key utmIDActiveutmID, type ?bool?int).
    • Same change on GetEmailCampaignsResponseCampaignsItem.

    Model fields removed

    • GetAccountResponse::dateTimePreferences
    • Webhook::channel
    • GetProcessResponseInfo::export
    • GetProcessResponse::error, ::createdAt, ::completedAt
    • Several ExternalFeeds response fields

    Model field types tightened

    • Process\GetProcessResponseInfoImport count fields changed from ?int to ?string (now URLs to CSV reports) — affects invalidEmails, duplicateContactId, duplicateExtId, and others.
    • Ecommerce\CreateUpdateProductResponse::id and CreateUpdateCategoryResponse::id: ?int?string.
    • Several string date fields tightened to ?DateTime (Program::*, Reward::*, BalanceLimit::createdAt/updatedAt).

    Model fields renamed

    • ConversationsMessageAttachmentsItem::fileNamename, ::inlineIdlink.

    Custom objects — associations union flattened

    • UpsertrecordsRequestRecordsItemAssociationsItem is now a single class with an action: 'link' | 'unlink' discriminator. 7 old variant classes have been deleted.

    Added

    • New optional fields and filters across contacts->createContact, contacts->updateContact, emailCampaigns->getEmailCampaigns, ecommerce->getProducts, and several other endpoints.
    • Tier groups support upgrade and downgrade schedule fields.

    Installing this RC

    Composer only installs RC builds when you ask for them explicitly. Either:

    composer require getbrevo/brevo-php:^5.0.0@RC

    Or set minimum-stability in your composer.json:

    {
      "minimum-stability": "RC",
      "prefer-stable": true,
      "require": {
        "getbrevo/brevo-php": "^5.0"
      }
    }

    When v5.0.0 ships stable, composer update will swap this RC for the stable release automatically.

    Holding on v4.x

    If you're not ready to migrate, pin to v4:

    composer require getbrevo/brevo-php:^4.0

    Migration

    See the Upgrading from v4.x guide for full migration details.

    Documentation

    Open source →
  4. 4.0.16 15 Jun 2026
    Release notes

    Fixed

    • CreateBatchOrderResponse::$batchId now deserializes correctly. The createBatchOrder endpoint returns the batch id as batch_id (snake_case), but the SDK looked for batchId, leaving it unset and throwing Cannot assign null to property ...::$batchId of type float on every call. The wire mapping is corrected to batch_id and the property is now nullable (?float). The $response->batchId accessor is unchanged.

    Backward-compatible patch release. No breaking changes.

    Open source →
  5. 4.0.15 13 Jun 2026
    Release notes

    Fixed

    • GetCampaignStats count fields are now nullable (?int): clickers, complaints, delivered, hardBounces, sent, softBounces, trackableViews, uniqueClicks, uniqueViews, unsubscriptions, viewed. This model is reused for statsByDomain on getEmailCampaign(s), where per-domain rows are sparse and the API returns null/absent for some counts. The previous non-nullable typing threw a TypeError while deserializing statsByDomain (globalStats was unaffected). (#138)

    Backward-compatible patch release. No breaking changes.

    Open source →
  6. 4.0.14 12 Jun 2026
    Release notes

    Fixed

    • senderEmail is now nullable (?string) on GetTransacBlockedContactsResponseContactsItem; the API returns null for some blocked or unsubscribed contacts (#137)
    • campaignId is now nullable (?int) on both UserUnsubscription item classes; form based unsubscriptions return null (#136)
    • Guzzle timeout support now works: interface_exists replaces class_exists for GuzzleHttp\ClientInterface, so the timeout option is honored (#133)

    Backward compatible patch release. No breaking changes.

    Open source →
  7. 4.0.13 10 Apr 2026
    Release notes

    v4.0.13

    Bug fixes

    getProcess / getProcesses — deserialization failure on completed processes (#121)

    • $duplicateEmailId was typed as ?int, but the API returns a URL string pointing to a CSV file of duplicate IDs.
    • It is now typed as ?string.

    getProcess / getProcesses — unknown status in_process (#122)

    • The API still returns the legacy in_process value (v3 name for processing).
    • GetProcessResponseStatus and GetProcessesResponseProcessesItemStatus now include InProcess = "in_process", so deserialization no longer throws on active processes.

    createEvent / createBatchEvents — boolean values rejected in contactProperties (#123)

    • contactProperties and eventProperties only accepted string|int.
    • Boolean values (e.g. 'MY_FLAG' => true) now serialize correctly.

    createContact / updateContact — integer values rejected in attributes (#124)

    • attributes values were typed as float|string|bool|array.
    • Passing a plain PHP int (e.g. 'OFFICE_ID' => 1234) now works without casting to (float).
    Open source →
  8. 4.0.12 27 Mar 2026
    Release notes

    Summary

    Resolved a field naming mismatch in the /orders/status/batch API response to align the implementation with the public contract.

    Issue

    During investigation of an L3 issue, a discrepancy was identified between the Swagger contract and the actual API response:
    • Contract (Swagger): batchId (camelCase)
    • Implementation: batch_id (snake_case)

    This inconsistency caused misalignment with client expectations and SDK behavior.

    Fix
    • Updated the response format to use batchId (camelCase) as defined in the Swagger specification.
    • Ensured consistency across API responses and documentation.

    Open source →
    Release notes
    • fix: improve JSON serialization and test configuration
    • Fix boolean type handling in JSON serialization and deserialization by adding explicit checks for bool values, since PHP's gettype() returns "boolean" instead of "bool". Also improve property default value detection using hasDefaultValue() check to avoid potential warnings. Update test configuration to support external WireMock orchestration via WIREMOCK_URL environment variable.
    • Key changes:
    • Add special case handling for bool types in JsonSerializer and JsonDeserializer
    • Use hasDefaultValue() check before calling getDefaultValue() in JsonSerializableType
    • Make test suite configurable with WIREMOCK_URL environment variable
    • Support dynamic port discovery for WireMock container in bootstrap
    • 🌿 Generated with Fern
    Open source →
  9. 4.0.11 25 Mar 2026
    Release notes

    What's Changed

    New features

    Events

    • Added getEvents() — retrieve a paginated list of custom events, filterable by contactId, eventName, objectType, startDate, and endDate.
      Supports limit (default 100, max 10,000) and offset for pagination.
      Note: currently only supports custom events.
    • Added createBatchEvents() — create multiple events in a single request using an array of CreateBatchEventsRequestItem. Returns a BatchAcceptedResponse.

    Ecommerce

    • CreateUpdateProductRequest and batch product upsert now accept two new optional fields: brand and description.

    Balance

    • getActiveBalancesApi() now accepts includeInternal to include balances tied to internal definitions.
    • getContactBalances() and getSubscriptionBalances() now accept a request object with an includeInternal parameter.
    • getTransactionHistory() now supports filtering by status (draft, completed, rejected, cancelled, expired) and transactionType (credit, debit).
    • createBalanceDefinition() and updateBalanceDefinition():
      • the meta field is now a typed object (isInternal: bool) instead of a generic key-value array.

    CRM

    • Added PatchCrmAttributesIdRequest to update CRM attribute labels and selectable option labels.

    Changes

    Ecommerce

    • metaInfo size limit for products clarified: maximum 20,000 characters total (previously documented as 1,000 KB / max 20 items).

    Account

    • users field on plan verticals is now nullable.

    Bug fixes

    • createContact() no longer throws a BrevoException
    • Checks if the response body is empty and returns null instead of trying to deserialize it
    • Only calls CreateContactResponse::fromJson($json) when there's actual content
    Open source →
    Release notes
    • SDK regeneration
    • Unable to analyze changes with AI, incrementing PATCH version.
    Open source →
  10. 4.0.10 12 Mar 2026

    Nothing published for this version

  11. v4.0.9 27 Feb 2026

    Nothing published for this version

  12. 4.0.7 01 Mar 2026

    Nothing published for this version

  13. 4.0.6 27 Feb 2026
    Release notes
    • chore: update Fern CLI version to 3.85.3
    • Update the Fern CLI version from 3.82.0 to 3.85.3 to incorporate latest tooling improvements and bug fixes.
    • Key changes:
    • Update cliVersion in .fern/metadata.json from 3.82.0 to 3.85.3
    • Maintain existing generator configuration settings
    • 🌿 Generated with Fern
    Open source →
  14. 4.0.5 23 Feb 2026

    Nothing published for this version

  15. v2.0.14 06 Nov 2025

    Nothing published for this version

  16. v2.0.13 16 Sep 2025

    Nothing published for this version

  17. v2.0.12 14 Sep 2025

    Nothing published for this version

  18. v2.0.11 02 Sep 2025

    Nothing published for this version

  19. v2.0.10 01 Aug 2025

    Nothing published for this version

  20. v2.0.9 20 Jul 2025

    Nothing published for this version

  21. v2.0.8 24 Jun 2025

    Nothing published for this version

  22. v2.0.7 13 Jun 2025

    Nothing published for this version

  23. v2.0.6 22 May 2025

    Nothing published for this version

  24. v2.0.5 12 May 2025

    Nothing published for this version

  25. v2.0.4 16 Jan 2025

    Nothing published for this version

  26. v2.0.3 03 Oct 2024

    Nothing published for this version

  27. v2.0.2 12 Aug 2024

    Nothing published for this version

  28. v2.0.1 12 Aug 2024

    Nothing published for this version

  29. v2.0.0 12 Mar 2024

    Nothing published for this version

  30. v1.0.2 14 Jul 2023

    Nothing published for this version

  31. v1.0.1 28 May 2023

    Nothing published for this version

  32. v1.0.0 25 May 2023

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive