splash/sendinblue
A Laravel package for integrating Sendinblue (now Brevo) into your applications. Send transactional emails and SMS, manage contacts, and access common API operations through a simple, fluent wrapper with streamlined configuration.
The splash/sendinblue bundle is an embedded connector for the Splash Sync framework — it is not usable standalone. It plugs a Brevo (formerly SendInBlue) account into a Splash Sync node so contacts, lists and related marketing objects can be pushed/pulled against a source system (PrestaShop, Magento, Akeneo, custom Symfony app, etc.).
Prerequisites:
splash/splash-bundle, splash/phpcore, splash/php-bundle) already configured for a source system.composer.json in the repo — the constraint has moved over time and the repo has effectively zero recent activity, so verify against your Symfony version before installing).First steps:
composer require splash/sendinblue (you’ll likely have to use --dev or pin a specific tag; there is no stable release stream to lean on).config/bundles.php:
Splash\Bundle\BrevoBundle\SplashBrevoBundle::class => ['all' => true],
Resources/config/ in the repo — typical Splash bundles register their Services/* classes and a Model/* mapping through services.yaml).env. In a typical Splash setup you register the connector in the Splash back-office (or via the splash.php config on the node) and paste the Brevo v3 key there.src/Services/ (the API wrapper: contacts, lists, ping, rate-limit handling) and src/Models/ (the Splash model classes such as ThirdParty, Address, etc.). Those two folders tell you what the connector actually supports.First use case: syncing Contacts — the natural lowest-risk flow. Once the key is set, run Splash’s Ping / SelfTest actions for the connector in the back-office. A green ping tells you the key works and the connector is reachable; then push a single test contact into a Brevo list and confirm it appears before wiring up the full object mapping.
Model-driven sync. Splash connectors are structured around Splash Models (the abstract objects exposed to the framework: ThirdParty, Address, Product, Order, etc.). Each model implements get/set/delete and declares field mappings. To extend behavior you generally subclass or override the service that talks to Brevo, not the framework. Search src/Services/ for the class that issues /v3/contacts calls — that is your extension point.
Service-layer wrapper. Brevo’s v3 API is REST/JSON with api-key header auth. The bundle’s service classes usually wrap Guzzle and expose typed methods like getContactByEmail, createOrUpdateContact, addContactToList, getLists. Call these from your own code when you need Brevo access outside of a Splash object — e.g. for one-off backfills. Reuse the bundle’s client rather than instantiating your own, so you inherit its error handling and base URL.
Field mapping / attribute handling. Brevo contacts have fixed attributes (EMAIL, FIRSTNAME, LASTNAME, SMS) plus custom attributes you define in Brevo. In Splash terms these are the model fields. When adding a new field:
YYYY-MM-DD).Webhook integration. Splash supports inbound webhooks so the connector can react to Brevo events (contact created, unsubscribed, etc.). If you enable them, register the Splash webhook URL in Brevo and expose a public, TLS-terminated endpoint. Treat this as optional — most setups are pull-only.
Sync workflow. Typical loop:
var/log.Backfilling. For a one-time import, drive the sync by enqueuing the same models you’d sync normally — do not call Brevo directly from a script, or you’ll drift from the connector’s dedup hashes and cause duplicate sends later.
composer.json, and budget time to fork if you depend on it in production. There is no upgrade path to assume.api.sendinblue.com/v2 or X-Mailin-Token is dead code; the v3 host is api.brevo.com with an api-key header.EMAIL is the primary key for contacts. Changing a contact’s email creates a new contact unless you use the ext_id (external ID) field. Map your stable local ID to Brevo’s ext_id early — it saves you a painful migration later."true"/"false"). Debug by inspecting the raw request/response in the Splash transport log first, before touching the model.Ping is your smoke test. In Splash, the Ping (self-test) action for a connector validates credentials and connectivity. Use it after every key change and after any composer update; if ping fails, nothing else will work..env. The Brevo key is a Splash server-level setting. Do not expect BREVO_API_KEY in .env to do anything; check splash node settings / Splash back-office first.autowire, so private + constructor injection from your app code needs an alias or a public: true override in your own services.yaml.App\Brevo\ContactService:
decorates: 'splash.sendinblue.service.contact'
arguments: ['@App\Brevo\ContactService.inner']
(Replace the decorated ID with the actual one from the bundle’s services.yaml — it varies by version.)delete on a contact may just mark it blacklisted in Brevo. Check the implementation before assuming a hard delete, or you’ll leave stale records.splash logger, and the back-office log viewer) rather than monolog’s default stack — the connector typically logs there, and the framework log viewer parses it into request/response pairs, which is far easier than digging through JSON strings.How can I help you explore Laravel packages today?