Callbacks
Include callback_url when you submit a query. Once the query reaches a final status (completed, timeout, or failed), the API sends a POST request to that URL.
POST /your/path HTTP/1.1Content-Type: application/json; charset=utf-8User-Agent: geoeval-callbackX-Geoeval-Signature: t=1798000095,v1=5257a869e7...The request body matches GET /v1/queries/{query_id}, including freshly signed recording URLs and a callback field describing the current delivery.
URL requirements
Section titled “URL requirements”- Must use
https, be publicly reachable, and contain no username, password, or URL fragment. - Private and internal IP addresses are rejected, including public hostnames that resolve to internal addresses.
- Redirects are not followed; provide the final target URL.
Responses and retries
Section titled “Responses and retries”- Respond with any
2xxstatus within 10 seconds. Run slow processing asynchronously after responding. - Failed deliveries retry after 30 s, 1 min, 2 min, and doubling intervals capped at 30 min, up to 10 total attempts. After the final failure,
callback.statuschanges tofailed. - Deliveries are at-least-once. Use
query_idas your idempotency key.
Verify the signature
Section titled “Verify the signature”X-Geoeval-Signature uses the format t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256(secret, "<t>.<raw body>") computed with the signing secret of the API key that submitted the query. For 24 hours after secret rotation, the header includes two v1 values; accept the callback if either matches. Reject requests whose timestamp differs from current time by more than 5 minutes.
Always compute the HMAC over the raw request body. Parsing and re-serializing JSON alters the byte sequence and breaks verification.
import { createHmac, timingSafeEqual } from "node:crypto";
// Checks X-Geoeval-Signature. rawBody is the request body exactly as received (before any JSON parsing),// secret is the signing secret of the API key that submitted the query (whsec_...).export function verifyCallback(rawBody: string | Buffer, header: string, secret: string, toleranceSeconds = 300): boolean { const parts = header.split(",").map((part) => part.split("=")); const timestamp = parts.find(([name]) => name === "t")?.[1]; if (!timestamp || Math.abs(Date.now() / 1000 - Number(timestamp)) > toleranceSeconds) return false; const expected = createHmac("sha256", secret).update(`${timestamp}.`).update(rawBody).digest(); // After a rotation there are two v1 values; one of them matching is enough return parts.some(([name, value = ""]) => { if (name !== "v1") return false; const given = Buffer.from(value, "hex"); return given.length === expected.length && timingSafeEqual(given, expected); });}import hashlibimport hmacimport time
def verify_callback(raw_body: bytes, header: str, secret: str, tolerance_seconds: int = 300) -> bool: # Checks X-Geoeval-Signature. raw_body is the body exactly as received, secret is whsec_... parts = [part.split("=", 1) for part in header.split(",")] timestamp = next((value for name, value in parts if name == "t"), None) if timestamp is None or abs(time.time() - int(timestamp)) > tolerance_seconds: return False expected = hmac.new(secret.encode(), timestamp.encode() + b"." + raw_body, hashlib.sha256).hexdigest() # After a rotation there are two v1 values; one of them matching is enough return any(name == "v1" and hmac.compare_digest(value, expected) for name, value in parts)Deleting the API key that submitted a query prevents signing and drops unsent callbacks. Revoking the key does not affect pending callbacks.