Webhooks - customize/remove payload body?

I'm trying to use Digital Ocean App Platform and their API expects an empty request body* when you post to their /deployments endpoint. Prismic is sending a json object with some stuff in it, so the webhook is failing with a 400 - Bad Request error.
Is there a way to make it just send the request, and not add extra stuff?

Or, if I'm going about this all wrong, how is everyone else using this feature?

*Edit: Actually, apparently the body is supposed to be {"force_build": true} in this case.

Hi @technical1,

There's no way to send an empty request body with Prismic. We have another user who deployed a Next.js app on Digital Ocean App Platform and added an API endpoint in their app to receive the webhook, format it, and forward the request to Digital Ocean. That could be an option.

It's not likely we'd consider removing the request body, since it includes a lot of important information about the content changes. However, if you think it would be a useful feature, I could submit a feature request to make it an option in the webhooks settings.

Sam

I was thinking of adding a protected /redeploy endpoint here too, but I just wanted to make sure there wasn't some option that already existed. Thanks for confirming! I'll do it myself :heavy_check_mark:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.