Webhook Subscription on Legacy Private returning 400/4XX

Hey, good evening!

I’m running into an issue while setting up a Webhook Subscription from HubSpot to my API endpoint (which was built specifically for this integration).

Problem:
Whenever HubSpot sends a webhook event to my endpoint, the request consistently returns a 400 (4XX) response.

What I’ve verified so far:

  • The endpoint is working correctly when tested via Postman/Scalar.
  • I can manually reproduce the exact request payload sent by HubSpot, and it works perfectly when sent through Postman.
  • The issue only occurs when the request originates directly from HubSpot.

What I’m unsure about:

  • Does HubSpot require any specific authentication or request validation (e.g., signature verification, headers, etc.) that might cause the request to be rejected?
  • Is there any known behavior where HubSpot modifies the request (headers, encoding, content-type) in a way that could lead to a 400 response?

Unfortunately, HubSpot only returns a generic 400 error without additional details, so I’m a bit stuck on how to debug this further.

Any guidance or suggestions would be greatly appreciated!

@LuccaGiffoni - My debug would include trying to see the webhook action/payload as it is generated from HubSpot by using one of the free webhook test endpoint tools. You have to change the target URL in your HubSpot setup, but this will almost certainly reveal something that you didn’t think was significant. I know, because the same thing has happened to me!

Good luck!

Steve

Hey, Steve!
Sorry for the late response, but I have figured it out. The problem was between the machine and the chair, by the way.

I was expecting a single object for payload, but got a list of objects, and I was not handling it on my backend.

Thanks for the time taken to respond.