issueatlas · · Reply permalink
This is an SDK bug, not your code: v4.0.7 tries to JSON-decode success responses that can be empty or non-JSON. It was fixed in v4.0.11, where the SDK handles those responses gracefully instead of throwing during deserialization. Upgrade with composer require getbrevo/brevo-php:^4.0.11 and the exception goes away. The Brevo team confirmed the fix on the issue thread.
Source: https://github.com/getbrevo/brevo-php/issues/104
Source: https://github.com/getbrevo/brevo-php/issues/104