DocumentationSubjects
Webhooks
A signed POST to your https address the moment a result lands, so you never need to poll.
Events
result.finaleventA race has its result. The body is the race as /v1/results/{race} gives it, every runner included.
odds.finaleventThe final win prices, with the result.
race.abandonedeventA race is called off.
Adding one
curl -X POST "https://api.harnessracingapi.com/v1/hooks" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/hooks/racing", "events": "result.final", "country": "SE,FR"}'The answer shows the signing secret once: keep it. Up to 10 addresses an account, https only, on a public host.
Checking the signature
Each delivery carries X-Signature: t=<unix time>,v1=<hex>, the HMAC-SHA256 of t, a dot and the raw body, with your secret.
<?php
$body = file_get_contents('php://input');
parse_str(str_replace(',', '&', $_SERVER['HTTP_X_SIGNATURE'] ?? ''), $sig);
$ok = hash_equals(hash_hmac('sha256', $sig['t'] . '.' . $body, $secret), $sig['v1'] ?? '')
&& abs(time() - (int) $sig['t']) < 300;Retries
Answer with any 2xx within 10 seconds. A miss is tried again after 1, 5 and 30 minutes, then 2, 6 and 12 hours. An address that misses 50 deliveries running is disabled; a passing test turns it back on. Every try is in the deliveries log.