Skip to main content
Argil sends an HTTP POST to your URL when an event happens. Webhooks follow the Standard Webhooks specification, so existing libraries verify them.

Two ways to subscribe

Both can be used together: an event goes to every matching destination. A per-request delivery carries no webhook-signature: treat it as a notification, and read the generation with GET /v2/generations/{id} before acting on it. Endpoints belong to the workspace: any of its API keys manages them, and they also receive the V1 events they subscribe to (in the V1 format).

Events

Only final events are sent, so each generation produces exactly one, and order does not matter. More event types will be added (assets, apps, agent runs); ignore types you do not handle. Subscribe with "enabled_events": ["*"] to receive future types too, V1 events included.

Payload

The body is an event wrapping the full generation, so you rarely need a follow-up GET:

Verify signatures

Always verify before trusting a payload. The signature is an HMAC-SHA256, with your secret, of {webhook-id}.{webhook-timestamp}.{raw body}. Reject timestamps more than 5 minutes old to block replays.

Respond fast, process later

  • Answer any 2xx within 10 seconds. Do the work in a queue.
  • Deduplicate on webhook-id: it is the event id and stays the same across retries.
  • Redirects are not followed. Return 410 Gone to disable the endpoint.

Retries

A delivery that times out or gets a non-2xx response is retried after 30 seconds, 2 minutes, 10 minutes, 1 hour, 6 hours, then every 12 hours (with jitter), for 3 days. After 3 days of failures, the endpoint is disabled (status: "disabled", disabled_reason: "failing") and the workspace owner is emailed. Re-enable it with PATCH /v2/webhook_endpoints/{id} and "status": "enabled"; what it missed is not replayed. Webhooks are at least once and can be late. For anything that must not be missed, also reconcile periodically with GET /v2/generations?completed_after=…: it lists the generations created through the API whose final event was sent since that time. Ask from a minute before your last reconciliation, and skip the ids you already handled: an event can be stamped a moment before it becomes visible.

Network

Your URL must be public HTTPS: hosts that resolve to a private network are refused.