Webhooks and callbacks
Two ways to hear that a run is done without polling.
A run takes from about 15 seconds to a few minutes. You can poll GET /jobs/{id}, or let HumanBlend call you:
| Webhook endpoint | Callback URL | |
|---|---|---|
| Set up | Once, for the account | On each request |
| Fires for | Every matching event | Only that one run, check or batch |
| Signed | Yes | No. It only says "fetch it now" |
| Best for | A server that handles every run | A step that waits for one run (Zapier, n8n's Wait node) |
Neither carries the text or the scores. Fetch the trusted result with your own key.
Webhook endpoints
Add an endpoint on the Developers page, or with POST /webhooks and the webhooks scope. The URL must be https on a public host. The signing secret is shown once.
An account can have 5 endpoints made on the Developers page and 50 made through the API.
Events:
job.succeeded,job.failed,job.cancelleddetection.completedbatch.completedcredits.lowwebhook.test(the Test button, orPOST /webhooks/{id}/test)
Body: { "id", "type", "created_at", "data" }. data is the run, check or batch object without its text.
{
"id": "evt_...",
"type": "job.succeeded",
"created_at": "2026-12-01T10:15:00Z",
"data": { "id": "5b0c4f0e-...", "object": "job", "status": "succeeded", "words": 812, "credits_charged": 812 }
}
Endpoints made by an integration
Zapier, Make and n8n each make one endpoint per Zap, scenario or workflow trigger. When you create an endpoint through the API, send source (zapier, make, n8n or api, default api) and a label (up to 100 characters; PATCH can change it), and the Developers page lists it as "Zapier: Run finished (Zap 123)". An integration subscribes when its trigger is switched on and deletes the endpoint when it is switched off.
Check the signature
Every delivery has a HumanBlend-Signature: t=<unix seconds>,v1=<hex> header. Compute HMAC-SHA256 of "<t>.<raw body>" with your secret and compare it to v1. Reject a t older than 5 minutes. After you rotate a secret, a second v1 arrives for 24 hours, signed with the old secret.
import crypto from "node:crypto";
function verify(rawBody, header, secret) {
const t = header.match(/t=(\d+)/)[1];
if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const want = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
return header.split(",").some((p) => p.startsWith("v1=") && crypto.timingSafeEqual(Buffer.from(p.slice(3)), Buffer.from(want)));
}
Use the raw request body, before any JSON parsing.
Retries
Any answer other than 2xx is retried after 1, 5 and 30 minutes, then after 2, 5 and 10 hours, then after 12 hours: 8 attempts in all. An endpoint that fails for 3 days is turned off, and you can turn it back on from the page or with PATCH /webhooks/{id} and "enabled": true. An endpoint made by Zapier, Make or n8n that stays off for 30 days is deleted. Endpoints made with source: "api" or on the Developers page are kept. GET /webhooks/{id}/deliveries shows the last 30 days.
Callback URL
POST /humanize, POST /detect and POST /batches accept an optional callback_url: an https URL on a public host, up to 2,000 characters, with the same checks as a webhook endpoint.
curl https://api.humanblended.com/v1/humanize \
-H "Authorization: Bearer $HUMANBLEND_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"text": "Your draft...", "callback_url": "https://hooks.example.com/resume/abc123"}'
When the run, check or batch reaches a final state, HumanBlend sends one POST to that URL with Content-Type: application/json and the header HumanBlend-Callback: <id>:
{ "object": "callback", "type": "job.succeeded", "id": "5b0c4f0e-...", "status": "succeeded" }
type is one of the event names above: job.succeeded, job.failed, job.cancelled, detection.completed or batch.completed. status is the final status: for a run succeeded, failed, cancelled or expired; for a bulk run completed, completed_with_errors or cancelled.
A bad
callback_urlis refused up front with400 validation_failed.The callback carries no text and no scores, and is not signed. It only says "fetch it now". Read the trusted result with
GET /jobs/{id},GET /detections/{id}orGET /batches/{id}and your own key.It is sent through the same queue as webhooks and retried the same way. It goes out on the next minute's pass, so expect it up to about a minute after the run ends. The
HumanBlend-Callbackheader carries the same id as the body'sid, and the User-Agent isHumanBlend-Callbacks/1.A bulk run sends one callback (
batch.completed), and its documents send none. A run that had already finished when your call answered still gets its callback.A repeat of the same
Idempotency-Keyreturns the first run and keeps its first callback URL.HumanBlend stores the URL with the run and never logs it. The
callback_urlfield of the run, check or bulk run reads"set"ornull, never the address.