Skip to main content
This tutorial builds a minimal integration that listens for Harly events and reads candidate data from the API. It assumes Harly is running and accessible at a public URL.

What you will do

  • Create a scoped API key
  • List jobs and candidates with the REST API
  • Register a webhook endpoint and verify its signature
  • Handle retries idempotently

Prerequisites

  • A running Harly installation at https://hiring.example.com
  • Owner access to Settings → Developers
  • Node.js 20+ for the webhook receiver

Step 1 — Create a scoped API key

1

Open Developers settings

Open Settings → Developers → API keys and select Create key.
2

Name and scope the key

Name it descriptively (for example ci-pipeline-sync) and select only the scopes the integration needs:Choose Secret key (sk) — publishable keys are limited to jobs:read and applications:write.
3

Copy the key

Copy the raw value immediately — it starts with harly_sk_live_ and is shown only once. Store it in your secret manager, never in source control.

Step 2 — Call the API

The base URL is https://hiring.example.com/api/v1. Every request requires a bearer token.

List published jobs

Use meta.pagination.nextCursor for the next page:

Read a candidate

Move an application

The move body uses toStageId. Always include an idempotency key on mutations:
A 409 may be a real conflict or an idempotency collision. Read the error envelope before retrying a mutation.

Step 3 — Register a webhook

1

Create the endpoint

Open Settings → Developers → Webhooks and select Create endpoint.
  • URL: https://your-receiver.example.com/harly/events
  • Events: choose the events your integration cares about
2

Store the signing secret

Copy the signing secret — it starts with whsec_ — and save it in your secret manager as HARLY_WEBHOOK_SECRET. It is shown once.
3

Send a test delivery

Select Send test and confirm your receiver returns 2xx.

Verify the signature

Harly signs every delivery with an x-harly-signature-256 header in the format:
The HMAC-SHA256 is computed over ${t}.${rawBody} keyed by the endpoint secret. Always verify against the raw request body before parsing JSON.

Receiver contract

Receiver rules:
  • Return 2xx after durable acceptance, not after completing downstream work.
  • Deduplicate by event.id — delivery is at-least-once.
  • Return 4xx for an invalid signature, 5xx for a transient failure.
  • Treat unknown event types as accepted and observable.

Step 4 — Handle retries

Design the receiver so reprocessing the same event is safe:
Replay failed deliveries from Settings → Developers → Webhooks → Delivery history after correcting the receiver.

Verification checklist

API key scoped to only the resources the integration reads or writes.
API key starts with harly_sk_live_ for production.
Webhook secret stored in secret manager, not in source.
Receiver reads x-harly-signature-256 header before parsing body.
Receiver deduplicates by event ID.
Mutations use idempotency keys.
Test delivery returns 2xx from the receiver.

Next steps

API resource reference

All resources, scopes, and error codes.

Webhooks

Complete webhook delivery and signature reference.

Automations

No-code event-driven workflows inside Harly.

Realtime events

Server-sent events for live browser updates.