Welcome to the new FlakeHub docs experience!
Features
Webhooks

Webhooks

⚠️

Webhooks are currently in beta. If you're interested in trying them out, contact support.

Webhooks can let your integrations take action in response to releases published on FlakeHub. They can be associated with any public for unlisted flakes your account has access to. Optionally, the events may be filtered by a version specifier. Webhook payloads sent by FlakeHub are signed if you provide a secret in the configuration, with the signature sent in the X-FlakeHub-Signature-256 header.

Example webhook configuration

OptionWhat it doesExample
URLURL to receive the POSTed webhook eventhttps://example.com/webhook
FlakeThe case-insensitive name of the flake to subscribe toDeterminateSystems/flake-schemas
Version specifierA SemVer version specifier event filter0.1.*
SecretThe secret value to HMAC (opens in a new tab) sign the message body with20f6dadcca4076863536ea852264e1d9105cc429d01f319872225ffe65ea8a92

Payload

For every matching release, your webhook receive JSON as a POST with a Content-Type of application/json. Here's an example JSON payload:

{
  "release": {
    "owner": "DeterminateSystems",
    "name": "fh",
    "version": "0.1.5",
    "revision": "c1b3308d60944c851e53df5eafd2384edec24178",
    "release_uuid": "018aadd0-e626-7807-abc0-756fc529f996",
    "visibility": "public",
    "mirrored": false,
    "description": "The official CLI for FlakeHub: search for flakes, and add new inputs to your Nix flake.",
    "published_at": "2023-09-19T14:21:04.163308Z",
    "project_html_url": "https://flakehub.com/flake/DeterminateSystems/fh",
    "release_html_url": "https://flakehub.com/flake/DeterminateSystems/fh/0.1.5",
    "flake_nix_url": "https://flakehub.com/f/DeterminateSystems/fh/0.1.5.tar.gz"
  }
}

For the beta, webhooks are attempted only once. We plan to provide configurable retry logic in the future.