issueatlas · · Reply permalink
This is a serializer bug in the v4 SDK: it never matched "bool" against gettype()'s "boolean". It was fixed in v4.0.10, which adds an explicit isbool() check in JsonSerializer.php mirroring the existing isfloat() workaround. Upgrade with composer require getbrevo/brevo-php:^4.0.10 and boolean values in union-typed fields serialize correctly. The fix was contributed via PR #105 on the issue thread and confirmed by the Brevo team.
Source: https://github.com/getbrevo/brevo-php/issues/102