{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreifgsgch3j3grucgqlore7tnzhe5hbvvhgexzhyzspcaxumlctubgq",
    "uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mij5ss6eki52"
  },
  "path": "/t/webhook-usecase/164297#post_2",
  "publishedAt": "2026-04-02T06:25:01.000Z",
  "site": "https://discuss.huggingface.co",
  "tags": [
    "@webhook_endpoint"
  ],
  "textContent": "**How to set this up:**\n\n  * **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 `FastAPI` server, or using the `@webhook_endpoint` decorator provided by the `huggingface_hub` Python library in a Gradio Space.\n\n  * **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.\n\n  * **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-Secret` header so it only accepts requests from Hugging Face.\n\n\n",
  "title": "Webhook usecase"
}