Level 1
the body should be JSON. enabled should be boolean. Try:
Http::withToken($token)
->asJson()
->patch('https://api.sendgrid.com/v3/user/webhooks/event/settings/signed', ['enabled' => true]);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I am trying this:
$token = getenv('SENDGRID_API_KEY');
$response = Http::withHeaders([
'Authorization' => 'Bearer ' . $token
])->patch('https://api.sendgrid.com/v3/user/webhooks/event/settings/signed',['enabled' => 'true']);
I get Bad Request (400). What do I have wrong? It works with curl?
This is what I am trying to do:
Mick
the body should be JSON. enabled should be boolean. Try:
Http::withToken($token)
->asJson()
->patch('https://api.sendgrid.com/v3/user/webhooks/event/settings/signed', ['enabled' => true]);
Please or to participate in this conversation.