GET /tasks/{task_id} in a loop, you can register a webhook endpoint and let Overten push results to you. Webhooks are the right default for production — especially for async jobs that run 10–25 minutes, where polling would make hundreds of wasted HTTP calls.
Two delivery patterns
Per-request
Include
webhook_url on a single generation call. Fires once for that task. Good for ad-hoc scripts and testing.Subscription
Call
POST /webhooks once per org. Fires for every matching event thereafter. The right default for production.Event types
Overten fires two events:| Event | When it fires |
|---|---|
run.completed | A task transitioned to status=completed |
run.failed | A task transitioned to status=failed |
Creating a subscription
Per-request webhooks
To fire a one-shot callback for a single task, includewebhook_url in the generation call:
GET /verify), not a per-subscription secret. The signature format is the same.
Payload shape
run.completed
run.failed
Verifying signatures
Every request Overten sends includes two headers:X-Overten-Signature—sha256=<hex_hmac>of the signed payloadX-Overten-Timestamp— Unix timestamp (seconds)
raw_body is the exact bytes of the POST body — not re-serialized JSON. Always verify against the raw bytes, before any JSON parsing.
Retry policy
If your endpoint returns a non-2xx response (or times out after 15 seconds), Overten retries with exponential backoff:4xx responses are not retried. If your endpoint returns 400, 401, or 404, Overten treats that as an explicit “do not try again” and stops immediately.
Best practices
Respond fast, process async
Respond fast, process async
Return
200 OK immediately and enqueue the actual work internally. Overten times out each attempt at 15 seconds. If your handler runs synchronously longer than that, the delivery will be treated as failed and retried.Be idempotent on run_id + event
Be idempotent on run_id + event
Retries and edge cases can cause duplicate deliveries. Key your processing logic on
(run_id, event) and skip if you’ve already handled that combination.Always verify signatures
Always verify signatures
Your webhook URL is publicly reachable, which means anyone can POST to it. Verifying the HMAC signature proves the payload came from Overten and hasn’t been tampered with. Never trust the payload without verifying first.
Store the secret like a database password
Store the secret like a database password
If your webhook secret leaks, rotate it by deleting the subscription and creating a new one — the new subscription will issue a fresh secret. Signatures from the old secret will stop validating immediately.
Managing subscriptions
Debugging deliveries
When debugging failed deliveries, the most effective approach is to log the raw POST body and headers your endpoint receives on every incoming webhook. Therun_id, task_id, and event fields in the payload are your primary identifiers — include them when opening a support ticket so the Overten team can trace the delivery history on their side.
