Hawkeye Docs

API

Webhooks

Signed events and how to check the signature.

Set an https URL on the key. Hawkeye POSTs JSON {"type": "<event>", "data": { ... }} with a 5 second timeout. There is no retry loop. A failure is logged as a status line, without the body and without the secret.

Headers

Events the server sends

EventWhendata fields
message.completedA partner message finishesconversation_id, agent_id, message, credits
call.startedAn outbound or inbound call is acceptedcall, and agent_id on an outbound call
call.transcriptOne utterance is bridgedcall_id, text
call.endedA call is endedcall_id, summary
usage.recordedAn image generation is chargedkind (image), credits, agent_id

Video generation charges credits and does not emit usage.recorded in the current handler.

Check the signature

digest=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$HAWKEYE_WEBHOOK_SECRET" | awk '{print $NF}')
test "sha256=$digest" = "$HAWKEYE_SIGNATURE" && echo ok

Compare the header to the digest of the raw bytes, before you parse JSON. The signing secret is the whsec_ value shown once when you set the URL.