A webhook is a URL on your server that we call when something happens, so your code doesn't have to keep asking.

Setting one up

  1. In Developers, choose Webhooks, then Add endpoint.
  2. Enter an HTTPS URL and pick the events you want, for example question.completed.
  3. Copy the signing secret. It's shown once.

Events

Questions reserved, completed, underfilled, canceled or refused; credits bought, running low or expiring; disputes resolved; and a connection nearing its cap.

Checking the signature

Every delivery has a x-50heads-signature header with a timestamp and an HMAC-SHA256 of the body made with your secret. Check it before you trust the payload. The webhook docs have code to copy.

Retries

Reply with a 2xx status within ten seconds. If you don't, we retry with backoff, eight times over 24 hours. The Deliveries log shows every attempt, and you can replay any delivery.

Deliveries can occasionally arrive twice or out of order. Use the event id to ignore repeats.