Webhooks - Support for including payload body and authorization headers

I have an API endpoint that would trigger a cache clear of my project, but I am looking to include 2 extra headers as well as a payload body specifying what environment / paths need to be cleared. Something like this:

headers: {
      'content-type': 'application/json',
      'x-api-key': deployToken,
    },
    body: JSON.stringify({
      environment,
      paths,
    }),

Is there / will there be support for including a payload body and authorization headers for our webhooks?

Hi Nicholas,

Welcome to the Prismic community,
Well, the custom headers feature has been implemented and being tested and I will let you know once it is deployed.
Please refer to this thread for more info:

And I see your use-case to add a custom body, and I think it is a good idea so I will create a feature request and send it to our @features-team.

Please let us know if you want to have an early access to the custom headers feature.

Best,
Fares

Hi Fares,

Thank you for the quick response. Is there any tentative release date on this feature? Just wondering if we are talking about maybe a month away, or maybe something like 6 months away? And thank you for submitting a feature request for the custom body support.

And yes, I would definitely appreciate early access to the custom headers feature so our team can start working with it and possibly provide any feedback to your team.

Best,
Nicholas

Well the custom header feature is going to be released soon, I can't give an ETA, it should soon (maybe from a week to few weeks max).
You can track the progress of the feature here

And yes I have added you to the early release list, and well reach out to one onc it gets in a early release stage.

Hi Fares,

Any news on this? Would love to try this out

1 Like

Hi Jonas,

A private alpha release is planned for the end of this week and I will let you know once it ready.

It would great if you can tell us what is your use case of the Custom headers feature.

Best,
Fares

Hi Fares,

Great! If I can be a part of the alpha or beta release I would love to test the new functionality.

I have described my use case in this reply from another post:

1 Like

I would also like to be part of this alpha if possible!

Hi,

The custom headers feature has been realised publicly, please let us know if you have any inquires

Threads close after a period of inactivity. Flag this thread to re-open it and continue the conversation.