Developer Tools
Hugging Face Webhooks
The AI model and dataset hub. Receive repo created, updated and deleted events, new commits, config changes, and discussion, pull request and comment events.
Connecting Hugging Face to Hookbase
Create a source in Hookbase first — it gives you an ingest URL to paste into Hugging Face. Then:
- 1Open huggingface.co/settings/webhooks and create a webhook
- 2Choose the repos, users or organizations to watch and the domains (Repo, Discussions), and enter your Hookbase ingest URL
- 3Paste the secret Hookbase generated for this source into the Secret field
- 4Hookbase checks X-Webhook-Secret, deduplicates retries and replays by the Webhook-Id header, and names events <scope>.<action> (repo.content.update)
Signature verification
Set the source's provider to hugging-face and paste the signing secret. Every request is checked before the event is stored, and anything that fails is rejected rather than quietly recorded.
- Algorithm
- Shared secret: the secret is sent back verbatim (no signature)
- Header
- X-Webhook-Secret
- Where to find the secret
- Hugging Face never generates the secret: you type it into the webhook's Secret field (huggingface.co/settings/webhooks). Hookbase generates one for you to paste there. It is compared as-is; there is no HMAC.
Hugging Face event types
11 of the events people route most often. Hookbase accepts every event Hugging Face sends, whether or not it is listed here.
repo.create
A watched repo was created
repo.update
A repo's settings or visibility changed
repo.delete
A repo was deleted
repo.move
A repo was renamed or moved
repo.content.update
New commits were pushed to a repo
repo.config.update
A repo's configuration changed
discussion.create
A discussion or pull request was opened
discussion.update
A discussion or pull request changed status
discussion.delete
A discussion was deleted
discussion.comment.create
A comment was posted
discussion.comment.update
A comment was edited
What a Hugging Face webhook looks like
A discussion.create payload. Hookbase stores the raw body exactly as it arrived, so this is also what you get back on a replay.
{
"event": {
"action": "create",
"scope": "discussion"
},
"repo": {
"type": "model",
"name": "openai-community/gpt2",
"id": "621ffdc036468d709f17434d",
"private": false,
"owner": {
"id": "628b753283ef59b5be89e937"
}
},
"discussion": {
"id": "6399f58518721fdd27fc9ca9",
"title": "Update co2 emissions",
"status": "open",
"num": 19,
"isPullRequest": true,
"changes": {
"base": "refs/heads/main"
}
},
"webhook": {
"id": "6390e855e30d9209411de93b",
"version": 3
}
}Start receiving Hugging Face webhooks
Create a source, paste the URL into Hugging Face, and watch the first event arrive. The free tier includes 1,000 events a month.
Get Started Free