Webhook usecase
Hugging Face Forums [Unofficial]
April 2, 2026
How to set this up:
On Space B: You need to build your Space so that it exposes a web endpoint. A common way to do this is using a Docker Space running a lightweight
FastAPIserver, or using the@webhook_endpointdecorator provided by thehuggingface_hubPython library in a Gradio Space.In your HF Settings: You go to your user/organization Webhooks settings, select Space A as the “Target Repository,” and paste the Direct URL of Space B as the destination.
Security: You configure a Webhook Secret in your settings and set that same secret as an Environment Variable in Space B. Space B’s code should verify the
X-Webhook-Secretheader so it only accepts requests from Hugging Face.
Discussion in the ATmosphere