Webhooks send a signed HTTPS POST to your server when something happens at a location you choose, so you don't have to
keep polling: when a government weather alert is issued, or when a weather value crosses a limit you set, now or within
the next hours of the forecast (for example wind gusts above 60 km/h in the next 6 hours). We check every 10 minutes and
these checks don't use your API calls.
Available on Pro+ (5 webhooks), Business (20), High Volume and Enterprise (50). Set them up on the
Webhooks page in your dashboard, where you can also send a test event and see recent deliveries.
Events
| type | When |
| weather.alert | A new weather alert is issued for the location (each alert is sent once). |
| weather.condition | The condition becomes true (sent once until it clears). |
| weather.condition.cleared | The condition is no longer true. |
| ping | The Test button on the Webhooks page. |
Example event
{
"id": "evt_3f1c9a0b2d4e6f708192",
"type": "weather.condition",
"created": "2026-11-03T14:20:00Z",
"webhook": { "id": 12, "name": "Site A high wind", "trigger": "Wind gust above 60 km/h within the next 6 hours at London, ..." },
"location": { "name": "London", "region": "City of London, Greater London", "country": "United Kingdom", "lat": 51.52, "lon": -0.11, "tz_id": "Europe/London", "localtime": "2026-11-03 14:20" },
"condition": { "metric": "gust_kph", "label": "Wind gust", "unit": "km/h", "operator": ">", "threshold": 60, "window_hours": 6,
"value": 67.3, "at": "2026-11-03 17:00", "source": "forecast" }
}
Delivery and retries
Answer with any 2xx status within 10 seconds. Anything else is retried after 1, 5, 15, 60 and 180 minutes. After 20 failed
deliveries in a row the webhook is switched off and we email you. Endpoints must use https on a public address.
Checking the signature
Every request has the header X-WeatherAPI-Signature: t=<unix time>,v1=<hex>, where v1 is the
HMAC-SHA256 of t + "." + raw request body with your webhook's signing secret (shown on the Webhooks page).
Reject requests whose signature doesn't match or whose t is more than 5 minutes old. The headers
X-WeatherAPI-Event and X-WeatherAPI-Delivery carry the event type and id.
# Python
import hmac, hashlib, time
def verify(raw_body: bytes, header: str, secret: str) -> bool:
parts = dict(p.split('=', 1) for p in header.split(','))
expected = hmac.new(secret.encode(), parts['t'].encode() + b'.' + raw_body, hashlib.sha256).hexdigest()
return abs(time.time() - int(parts['t'])) < 300 and hmac.compare_digest(expected, parts.get('v1', ''))