Skip to content
Subscribe free

Receive releases by webhook

Get signed JSON with your matching releases at your HTTPS endpoint each morning. How to register, answer the challenge and verify signatures.

Affiliwire webhooks send signed JSON to your HTTPS endpoint each morning there is news for your filters. Use them to feed releases into your own app, database or workflow. No account needed. The developer reference, with a sample payload and verification code, is at /subscribe#webhooks.

Register an endpoint

  1. Go to /subscribe and pick your filters. See how filters work.
  2. In the Webhooks section, enter your HTTPS URL and click Add endpoint.
  3. Affiliwire sends a POST with {"event":"endpoint.verify","challenge":"..."}.
  4. Your endpoint answers with a 2xx status and a body that is exactly the challenge value, or {"challenge":"..."}.
  5. Save the manage link and the signing secret shown on the page. They are shown once.

Handlers that echo any request body back won't pass. Return the challenge only.

What you receive

Each morning with matching news, you get one wire.digest event. The headers include X-Affiliwire-Event, X-Affiliwire-Delivery and X-Affiliwire-Signature. The body lists the releases with their wire ID, title, brand, update type, tags, and links to the release page.

Verify the signature

The X-Affiliwire-Signature header looks like t=1764500700,v1=5f2c....

  1. Split the header into t (a Unix timestamp) and v1.
  2. Compute an HMAC-SHA256 of the string t.rawBody (the timestamp, a period, then the unparsed request body) using your signing secret. Hex-encode it.
  3. Compare it with v1 using a constant-time comparison.
  4. Reject the request if t is more than a few minutes old.

Verify against the raw body, before any JSON parsing. Trust the signed body, not the headers, and use its delivery_id to make your handler idempotent.

Manage the endpoint

Your manage link lets you change filters, send a test digest, pause, remove the endpoint, rotate the signing secret, or issue a new manage link.

If something goes wrong

Registration fails. Check that the URL is public HTTPS on the standard port (443), answers quickly without a redirect, and returns only the challenge.

Lost the manage link. Register the same URL again. Nothing changes, and the current manage link is posted to your endpoint as a signed endpoint.recover event, so only whoever runs the endpoint can pick it up.

Signature never matches. You are probably hashing parsed and re-serialized JSON. Hash the raw bytes.

Still stuck?

Email hello@affiliwire.com or check the FAQ.