Docs Sign in Get a key

Docs / API reference

Webhooks API

Reference of the Hapti webhooks endpoints: parameters, fields and real responses.

Every endpoint takes a key in the Authorization header: Authorization: Bearer hp_test_.... Base address: https://api.hapti.dev. The full specification is in openapi.json.

Create an endpoint

HTTP
POST /v1/webhooks/endpoints

An https address that receives the events you choose, signed with its own secret. The secret is returned once here.

ParameterInDescription
Idempotency-KeyheaderAny unique string of 1 to 255 visible characters. The same key with the same request within 24 hours returns the first answer again instead of acting twice.
FieldTypeDescription
urlstring
eventsarrayEvent types, a family like user., or [""] for every event, including future ones.
descriptionstring
headersobjectUp to 10 headers sent with each delivery.
enabledboolean
Response 201
{
  "id": "we_0e47caf33717b1a8",
  "object": "webhook_endpoint",
  "url": "https://api.example.com/hooks/hapti",
  "events": [
    "task.succeeded",
    "task.failed",
    "task.waiting"
  ],
  "description": "Production",
  "enabled": true,
  "disabled_reason": null,
  "disabled_at": null,
  "failing_since": null,
  "last_success_at": null,
  "headers": {},
  "mode": "test",
  "secret": "whsec_0f9c3a…",
  "previous_secret_expires_at": null,
  "created_at": "2026-11-22T18:40:56.225Z"
}

List endpoints

HTTP
GET /v1/webhooks/endpoints

With their deliveries and failures of the last 7 days.

Get an endpoint

HTTP
GET /v1/webhooks/endpoints/{id}
ParameterInDescription
idpathWebhook endpoint id

Update an endpoint

HTTP
PATCH /v1/webhooks/endpoints/{id}

Address, events, description, headers, or enabled to pause and resume.

ParameterInDescription
idpathWebhook endpoint id
FieldTypeDescription
urlstring
eventsarrayEvent types, a family like user., or [""] for every event, including future ones.
descriptionstring
headersobjectUp to 10 headers sent with each delivery.
enabledboolean

Delete an endpoint

HTTP
DELETE /v1/webhooks/endpoints/{id}
ParameterInDescription
idpathWebhook endpoint id

Reveal the secret

HTTP
GET /v1/webhooks/endpoints/{id}/secret
ParameterInDescription
idpathWebhook endpoint id

Roll the secret

HTTP
POST /v1/webhooks/endpoints/{id}/roll-secret

A new secret; the previous one stays valid for expires_in_hours (24 by default, 0 to 168) and each delivery carries both signatures meanwhile.

ParameterInDescription
idpathWebhook endpoint id
FieldTypeDescription
expires_in_hoursinteger

Send a test event

HTTP
POST /v1/webhooks/endpoints/{id}/test

Sends a signed ping event now and returns the delivery with the answer of your server.

ParameterInDescription
idpathWebhook endpoint id

Send missed events again

HTTP
POST /v1/webhooks/endpoints/{id}/recover

Sends once every event of the period that never reached this endpoint.

ParameterInDescription
idpathWebhook endpoint id
FieldTypeDescription
sincestring3 days ago by default, at most 30

Reveal the organisation secret

HTTP
GET /v1/webhook/secret

The secret that signs the deliveries of webhooks given on a task or a batch with the webhook field.

List event types

HTTP
GET /v1/webhooks/events

List deliveries

HTTP
GET /v1/webhooks/deliveries
ParameterInDescription
endpointqueryEndpoint id
eventqueryEvent type
statequerypending, delivered or failed
limitqueryUp to 100
cursorquerynext_cursor of the previous page

Get a delivery

HTTP
GET /v1/webhooks/deliveries/{id}

With every attempt, the answer of your server and the body sent.

ParameterInDescription
idpathDelivery id

Send a delivery again

HTTP
POST /v1/webhooks/deliveries/{id}/resend
ParameterInDescription
idpathDelivery id