HAREPOST docs Get a key ➔

Send a webhook

The /v1/send endpoint and every option you can set on a delivery.

Send an outbound HTTP request through Harepost. The request is queued and delivered to your target with automatic retries, and you get a queue_id back immediately.

POST https://api.harepost.com/v1/send
Authorization: Bearer hp_live_YOUR_KEY
Content-Type: application/json

The target must be on a domain your account has verified. Sending to an unverified domain returns 403. See domain verification.

Request body

FieldTypeRequiredNotes
targetstringyesThe destination URL. Must be https. Cannot resolve to a private, loopback, or link-local address.
methodstringnoHTTP method for the delivery. One of POST, PUT, PATCH, DELETE, GET. Defaults to POST.
headersobjectnoHeaders forwarded to your target. A few hop-by-hop and auth headers are stripped (see below).
bodystring or objectnoThe payload. A string is sent as-is. An object is JSON-encoded, and Content-Type: application/json is set if you did not provide one. Ignored for GET.
deliveryobjectnoRetry and timeout policy. See the table below.
idempotency_keystringnoForwarded to your target as X-Harepost-Idempotency-Key so your endpoint can dedupe. Returned in the response.
signbooleannoWhen true, the delivery is signed and carries an X-Harepost-Signature header your endpoint can verify. See verify signatures. Defaults to false.
metadataobjectnoStored for your own reference and visible in the delivery history. Never sent to your target.

Delivery policy

All fields are optional and clamped to the ranges below.

FieldTypeDefaultRange
max_attemptsnumber51 to 25
backoffstringexponentialexponential or fixed
base_delay_msnumber1000100 to 60000
max_delay_msnumber36000001000 to 43200000 (12 hours)
jitterstringfullfull or none
timeout_msnumber100001000 to 30000
respect_retry_afterbooleantruehonors a Retry-After header from your target

A value outside its range is clamped to the nearest bound rather than rejected. How these interact during delivery is covered in retries and delivery behavior.

Headers Harepost adds

Every delivered request carries:

  • X-Harepost-Queue-Id — the delivery’s queue_id.
  • X-Harepost-Idempotency-Key — present only if you set one.
  • User-Agent: Harepost/1.0

These headers are stripped from anything you pass in headers, since Harepost or the network controls them: host, content-length, connection, transfer-encoding, keep-alive, upgrade, expect, and authorization.

Example

curl -X POST https://api.harepost.com/v1/send \
  -H "Authorization: Bearer hp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "target": "https://your-app.com/webhook",
    "body": { "event": "order.paid", "id": "ord_123" },
    "idempotency_key": "ord_123-paid",
    "delivery": { "max_attempts": 8, "base_delay_ms": 2000 }
  }'

Response

A 202 means the request is accepted and queued, not that your target has received it.

{
  "queue_id": "hr_9f2a81k2",
  "status": "queued",
  "idempotency_key": "ord_123-paid",
  "created_at": "2026-06-10T14:22:10Z"
}

Status codes

CodeMeaning
202Accepted and queued.
400Invalid request: bad JSON, missing or non-https target, or a disallowed method.
401Missing or invalid API key.
403The target domain is not verified for your account.
429Rate limit exceeded. Wait and retry; a Retry-After header tells you how long.

Look up what happened to a queued request with the deliveries API.