SendGrid v3 400 bad request
<p>I'm using <strong>sendgrid/sendgrid-php</strong> <a href="https://github.com/sendgrid/sendgrid-php" rel="nofollow noreferrer">the repo on github</a> to send transnational emails. Today I've updated the library, the new one uses the API v3 whereas I used v2 before. I've changed the code as per their examples, here is a dump of my SendGrid\Mail object:</p>

<p><a href="https://i.stack.imgur.com/w1P0w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w1P0w.png" alt="enter image description here"></a></p>

<p>The problem is that I'm constantly receiving the 400 BAD REQUEST error without any additional info:</p>

<p><a href="https://i.stack.imgur.com/uGql6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uGql6.png" alt="enter image description here"></a></p>

<p>What am I doing wrong? The mail object seems to be correct.</p>

<p>I'm trying to send the email the following way:</p>

<pre><code>$apiKey = getenv('SENDGRID_API_KEY');
$sg = new \SendGrid($apiKey);
$request_body = [creating the mail object];
$response = $sg-&gt;client-&gt;mail()-&gt;send()-&gt;post($request_body);
</code></pre>