Webhooks custom headers not being sent

Builder content link

Builder public api key
fbb6c646f8ce4b1abcaa7739e25f28e2

Detailed steps to reproduce the bug

  1. Use the Admin SDK to add a webhook to a model and add customHeaders to that model.
  2. Trigger a publish event for that model.
  3. Examine the published event sent to the webhook URL. Notice that there are no custom headers.

Screenshots or video link
To verify that custom headers can be sent, I’ve manually triggered a publish event to our webhook URL including the custom header with curl:

curl -d '' 'https://pages.vrio.dev/publish/fbb6c646f8ce4b1abcaa7739e25f28e2' \
     -H 'x-pages-hooks:12345'

This works as the header can be seen in our Rollbar logs:

However, if I trigger the publish event → webhook from Builder, I get no such header:

I’ve confirmed that the models all have the same header included in their definitions in the Admin SDK:

So I think that the customHeaders are not being sent through.

Code stack you are integrating Builder with
Next.js SSG from AWS Lambda webhook.

Notes
I believe this probably goes back to the unfinished state of the Admin SDK, probably exposing a feature that makes sense but not implemented on the other end. I have this issue created regarding adding more documentation to the Admin SDK which would hopefully illuminate what works and what doesn’t.

What would really help is if we could edit the webhook as part of the UI. If this is exposed only via the Admin SDK, it becomes very difficult to test because the Admin SDK is so hard to use. If we could add custom headers in the Builder model webhook UI, I could test whether it works there before having the back end team make changes.

Hi @vrio_dave ,

Thanks for reporting this, this is happening because of the customHeaders object on the webhook definition not matching the expected interface. was that model created or updated using the admin API?
We are in the process of adding validations/documentation to the admin API, in the meanwhile here are the expected types:

You’d want the custom headers to be something like:

customHeaders: [{ name: 'header-name', value: 'header-value' }]