# Webhooks

> Get an HTTPS request at your own URL when something happens in Folio.

Source: https://folio.hippodev.app/docs/webhooks

Webhooks let your own code react to Folio: update your site when a resume is published, forward contact messages to Slack, or log when a recruiter opens a private link. Webhooks are part of **Pro**.

## Add an endpoint

In **Account → Webhooks**, choose **Add endpoint**, enter a public `https://` URL, and pick the events to send (or all of them). Each endpoint gets its own **signing secret**. **Send test** delivers a `ping` right away so you can check your endpoint.

## Events

| Event                               | When                                                         |
| ----------------------------------- | ------------------------------------------------------------ |
| `resume.created`                    | A resume or cover letter is created, imported, or duplicated |
| `resume.updated`                    | A new version is saved (Folio saves versions as you edit)    |
| `resume.published`                  | A resume is published or republished                         |
| `resume.unpublished`                | A resume is unpublished                                      |
| `resume.deleted`                    | A resume is moved to the trash                               |
| `domain.verified` / `domain.failed` | A custom domain goes live, or can't be connected             |
| `message.received`                  | Someone writes through your contact form                     |
| `link.opened`                       | A private link is opened (every view)                        |

## The request

Folio sends a `POST` with a JSON body:

```json
{
  "id": "evt_4f9c2a…",
  "type": "resume.published",
  "created_at": "2026-10-05T08:30:00.000Z",
  "data": {
    "resume": { "id": "d45582e0a687", "title": "Product designer", "kind": "resume", "slug": "product-designer", "visibility": "public" }
  }
}
```

Payloads carry ids and short facts, not the whole resume or message: fetch details with the [API](https://folio.hippodev.app/docs/api) if you need them. The same `id` is used for every endpoint that gets the event, so you can ignore duplicates.

Headers:

* `Folio-Event` — the event type
* `Folio-Delivery` — this delivery's id (shown in the delivery log)
* `Folio-Signature` — `t=<unix seconds>,v1=<signature>`

## Check the signature

The signature is an HMAC-SHA256 of `<t>.<raw body>` with your signing secret, in hex. Compare it in constant time, and reject old timestamps (for example, older than 5 minutes):

```js
import { createHmac, timingSafeEqual } from "node:crypto";

export function verifyFolio(rawBody, header, secret) {
  const t = /t=(\d+)/.exec(header)?.[1];
  const v1 = /v1=([0-9a-f]+)/.exec(header)?.[1];
  if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  return v1.length === expected.length && timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}
```

Use the **raw** request body: parsing and re-serializing the JSON changes it.

## Retries

Answer with any `2xx` status within 10 seconds. Anything else — another status, a timeout, a redirect — counts as a failure, and Folio tries again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours, and 24 hours. An endpoint that fails 15 times in a row is turned off, and you get a notification; turn it back on in **Account → Webhooks** once it's fixed.

The delivery log there shows the last 50 deliveries with their response. Select **Send again** on any of them. Logs are kept for 30 days.

## Good to know

* Endpoints must be public `https://` addresses — Folio won't send to private networks.
* Up to 10 endpoints per account.
* **New secret** replaces the signing secret immediately; update your endpoint at the same time.
* On the Free plan, endpoints stay saved but deliveries pause.
