Log in Book a demo

Events and webhooks

In short

Changes in Hyperdesk raise events. Agents can read the events in order with events.list, and webhooks send them to your own endpoint, signed.

Events

Changes in Hyperdesk raise events, each attributed to the person or agent that made it and the surface it came through. The same events feed webhooks, notifications, agent triggers and the audit log.

events.list (admins) reads them in order:

Code
POST https://<your-hyperdesk-address>/api/v1/events.list
{ "eventTypes": ["applicationSubmit", "candidateStageChange"], "limit": 100 }
  • Each item has id, eventType, aggregateType, aggregateId, actorType, actorId, webhookActionId, payload and occurredAt.
  • Pass back the cursor from the last call to get only newer events. It is returned even when there is nothing new, so an agent can poll with it.
  • since (a time) starts without a cursor; limit goes up to 500.

Webhooks

Admins set webhooks up in Hyperdesk under Admin > Webhooks, or with webhook.create. Each webhook sends one event type to one URL.

  • The URL must be public and use https.
  • A test ping goes to the URL first. If it fails, the webhook is saved turned off, so nothing is sent to an endpoint that isn’t there. verify: false skips the ping.
  • The signing secret (whsec_...) is shown once, when the webhook is made. Hyperdesk never shows it again.

A delivery is a POST with a JSON body:

Code
{ "webhookActionId": "...", "action": "candidateStageChange", "data": { ... } }

and these headers:

HeaderValue
Content-Typeapplication/json
User-AgentHyperdesk-Webhook
Hyperdesk-Signaturesha256=<HMAC-SHA256 of the raw body, hex, keyed with the secret>
Ashby-SignatureThe same value, for receivers moving over from Ashby
Hyperdesk-DeliveryThe delivery’s id

Checking the signature

Compute the HMAC-SHA256 of the raw request body with your secret and compare it with the header, in constant time. In Node.js:

Code
import crypto from "node:crypto";

function isFromHyperdesk(rawBody, header, secret) {
  const expected = "sha256=" + crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
  const a = Buffer.from(expected), b = Buffer.from(header || "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

Delivery and retries

  • Deliveries go out from a scheduler that runs every 5 minutes. Each event becomes deliveries exactly once.
  • A delivery succeeds on any 2xx reply within 10 seconds. Redirects aren’t followed.
  • A failure is retried with exponential backoff: after attempt n, the next try waits (2^n - 1) x 10 seconds, up to 10 attempts in all.
  • Replies of 400, 401, 403, 404, 405, 410 and 422 aren’t retried: the delivery is marked as a permanent error.
  • webhook.listDeliveries shows each delivery’s status, attempts and last error. webhook.replay sends a past delivery again with the same webhookActionId, so receivers can drop duplicates by that id.
  • Some events also reach webhooks for broader types: candidateHire is also sent to candidateStageChange and applicationUpdate webhooks, interviewScheduleCreate to interviewScheduleUpdate, jobPostingPublish and jobPostingUnpublish to jobPostingUpdate, and interviewPlanTransition to jobUpdate.

Event types

A webhook can subscribe to any of these. Names follow Ashby’s webhooks where Ashby has the event.

ping, applicationSubmit, applicationUpdate, candidateHire, candidateStageChange, candidateDelete, candidateMerge, candidateRecentEmailMessagesUpdated, interviewPlanTransition, interviewScheduleCreate, interviewScheduleUpdate, jobCreate, jobUpdate, jobPostingUpdate, jobPostingPublish, jobPostingUnpublish, jobPostingDelete, offerCreate, offerUpdate, offerDelete, openingCreate, openingUpdate, openingDelete, pushToHRIS, surveySubmit, signatureRequestUpdate, takeHomeAssignmentAssigned, takeHomeAssignmentSubmitted, takeHomeAssignmentCompleted, takeHomeAssignmentCancelled, feedbackSubmitted, noteCreated, mentionCreated, emailReceived, sequenceReplied, proposalCreated, agentRunCompleted, taskDue.

The tools: webhook.list, webhook.info, webhook.create, webhook.update, webhook.delete, webhook.listDeliveries, webhook.replay and events.list.

Need an account?

Every surface needs a Hyperdesk account; access is by invitation. Using Hyperdesk day to day? The help center has the how-tos.

↑↓ to moveEnter to openEsc to close