Getting the wire
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
- Go to /subscribe and pick your filters. See how filters work.
- In the Webhooks section, enter your HTTPS URL and click Add endpoint.
- Affiliwire sends a
POSTwith{"event":"endpoint.verify","challenge":"..."}. - Your endpoint answers with a 2xx status and a body that is exactly the challenge value, or
{"challenge":"..."}. - 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....
- Split the header into
t(a Unix timestamp) andv1. - 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. - Compare it with
v1using a constant-time comparison. - Reject the request if
tis 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.