Skip to main content

Send events

Create an event with POST /v1/events. Hookline queues the event and delivers it to every endpoint subscribed to its type.

Request fields​

FieldTypeRequiredDescription
typestringYesEvent name, such as invoice.paid
payloadobjectYesJSON body that receivers get
idempotency_keystringNoPrevents duplicate events on retries

Example request​

curl -X POST https://api.hookline.example/v1/events \
-H "Authorization: Bearer $HOOKLINE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"invoice.paid","payload":{"invoiceId":"inv_1042"}}'

Response​

A successful request returns 202 Accepted:

{
"id": "evt_8f2a91",
"status": "queued"
}

Idempotency​

Send the same idempotency_key twice and Hookline creates one event. Keys expire after 24 hours.

Retry schedule​

If an endpoint doesn't return a 2xx status code, Hookline retries the delivery.

AttemptDelay after previous attempt
1Immediate
21 minute
310 minutes
41 hour
56 hours

After the last attempt, Hookline marks the delivery as failed. You can replay failed events from the dashboard.