[WEBHOOK] Allow an optional callback_url parameter on the enqueue call, as an alternative to webhook_ids
Today webhooks must be pre-registered per model in the platform UI, and the enqueue call only accepts webhook IDs (webhook_ids). There is no way to give a URL at request time.
This does not scale well for us:
We have N models and several environments (local, dev, staging, prod), so we have to create and maintain N x M endpoints by hand in the UI, plus one per developer for local work.
Each environment then needs its own
MINDEE_V2_WEBHOOK_IDvalue to keep in sync, so configuration lives half in your UI and half in our code.For local development the tunnel URL (ngrok, localtunnel) changes regularly, so a developer has to go back into the UI and edit the endpoint every time.
Log in to comment and vote
Comments2
Ianaré Sévi
Aug 6
Hi, and thanks for the clear feedback.
Webhooks need to be defined on the platform in order to generate the shared key for HMAC validation.
Also not having a webhook ID would be a breaking change in the API.
However, we could potentially add a CRUD API for webhooks, allowing developers to more easily manage their webhooks without needing to interact with the platform.
Let us know what you think.
Have a good one!
Ismaile ABDALLAH
Aug 31
Thanks, that makes sense on the HMAC and the breaking change.
On the CRUD API though, I don't think it would solve the problem on our side. It just moves the manual step into a setup command we would have to run on every ephemeral env deploy, plus a cleanup on teardown, and again locally each time the tunnel URL changes. Honestly, we probably wouldn't use it.
The pain is really about not having to manage webhook state per environment at all.
This is just my opinion and my own use case, so feel free to weigh it against what other users need.