Skip to main content
The live OpenAPI document at /api/v1/openapi.json defines the exact request and response schema. This page helps you choose the right resource and scope before opening the generated reference.
Harly API reference showing job endpoints, authorization, query parameters, and a JSON response.

Generated OpenAPI reference with resources, scopes, and request examples.

API key format

API keys have the format harly_{type}_{env}_{secret}: Example secret key: harly_sk_live_AbCdEf123... Publishable keys (pk) are limited to jobs:read and applications:write — the subset safe to expose in a browser. Even with applications:write, a publishable key can only create applications; moving, rejecting, hiring, and bulk-creating require a secret key. Use secret keys for all server-side integrations.

Resources

Mutation examples

List jobs

Create a candidate

Move an application

Use toStageId (not stageId) and always include an idempotency key on mutations:

Reject an application

Rotate an API key

A rotation issues a new raw key value and invalidates the previous one. The response includes key — the new raw value, shown once.

Pipeline stages

Stages belong to one job. Each stage has a kind (applied, screening, interview, offer, hired, rejected, withdrawn, or custom) that decides what happens to an application that enters it. The name is display text only: renaming a stage never changes its outcome. Rules that keep pipelines consistent:
  • A job always keeps at least one active stage that is not hired, rejected or withdrawn, and active stage names are unique (ignoring case).
  • Changing kind is refused when the stage holds applications and the change crosses an outcome (to or from hired, rejected or withdrawn). Archive the stage with a merge target of the right kind instead.
  • Archiving a stage that holds applications requires mergeIntoStageId. An active stage merges into an active stage. An outcome stage merges only into a stage of the same outcome, so no application’s status changes.
  • Deleting is refused when the stage has applications, appears in stage history, scorecards, document requirements or an automation. Archive it instead.
A merge does not send candidate emails and does not emit application.stage_changed webhooks, because the application’s status does not change. Example: archive a screening stage and move its applications into interview.
Stage endpoints use the stages:read and stages:write scopes.

All scopes

Errors

Use synthetic data in examples and integration tests. Never place a real resume or candidate email in a public README or issue.

Public jobs and applications

These routes are intended for career sites, custom application forms, and the Harly embed widget. They are CORS-enabled and do not require a secret key, but each request must be scoped to a workspace with ?workspace=<slug> or a publishable key (pk_). See the public API guide for request and response examples. Publishable keys are limited to jobs:read and applications:write. They are safe to expose in browser code, but they are not authentication for a person; they only identify and scope the workspace. Never expose a secret key. The public list endpoint accepts department, location, workplaceType, and q filters. Public application submissions return 201; validation failures return 422, failed CAPTCHA checks return 403, unavailable jobs return 404, and rate-limited clients receive 429 with Retry-After.

OpenAPI document

Fetch /api/v1/openapi.json from your Harly instance for the full generated contract.