Skip to content

Webhooks

A webhook is an HTTPS endpoint you register once for your organization. Extralt POSTs an event to it each time work finishes, whether the work was started from the dashboard, the Agent, the API, MCP, or a Schedule. Use webhooks to trigger a workflow or to stop polling a Run.

Events are signed with Standard Webhooks. The SDKs verify them, and so do existing libraries in most other languages.

Event types

Each event is sent when a resource reaches a final status, or when a finished Run or Import found Changes. Its data is the same object the API returns for that resource.

Event typeSent whendata
store.readyA Store's crawler is ready, so Runs can read itStore (GET /v1/stores/{store_id}), with state set to null
store.failedA Store's crawler build failed, including a store the check refusedStore, with state set to null
run.completedA Run completedRun (GET /v1/runs/{id})
run.stoppedA Run was stoppedRun
run.failedA Run failedRun
run.changesA finished Run found ChangesRun
import.completedAn Import completedImport (GET /v1/imports/{id})
import.failedAn Import failed, including failed validationImport
import.changesA finished Import found ChangesImport
webhook.testYou sent a test eventA fixed sample

A Store sends store.ready or store.failed each time its crawler becomes ready or fails: adding a failed Store again sends another when its new build ends. A change of plan does too: when a Scale subscription ends, Stores on a custom crawler fail with the needs_scale refusal, and they are ready again once it is renewed. Read crawler.refusal and crawler.status_reason to know why a Store failed: see Stores.

A restarted Run sends a new event each time it finishes, so a Run that failed, was restarted, and then completed sends run.failed and then run.completed.

New event types are added over time. An endpoint created without event_types receives them as they arrive, so ignore types your handler does not know rather than rejecting them.

Changes events

run.changes and import.changes follow the final status of a Run or Import whose PDPs found at least one of six kinds of Change: a price decrease or increase, an offer going out of stock or restocked, or a Listing added or removed. These are the kinds GET /v1/activity counts. No event is sent when nothing changed, nor when a restarted Run found the same counts again. The event says that something changed; its data is the Run or Import, not the Changes.

To read what changed, use the Explore routes. None of them filters by Run or Import, so scope them by the Store and a time window that covers the work:

  • GET /v1/changes lists every Change, including kinds the event does not count, such as compare-at price and content changes. Each Change carries the run_id it was observed in, so you can keep the Run's own rows. Its window is a window length ending at to.
  • GET /v1/activity counts the six kinds per Store and time bucket, and GET /v1/activity/events lists the events of one kind. Both take from and to.

A Run's Changes are dated when its pages were read. An Import's Changes are dated at the Import's created_at, when Extralt received the file, and carry an empty run_id. See Changes and Time windows.

Manage webhooks

Manage webhooks in the dashboard under Settings > Connections, or through the API with an API key. MCP has no webhook tools.

Dashboard

The Webhooks section of the Connections page lists each endpoint with its Endpoint, Events, who Created it and when, its Status and its Last delivery, and opens an endpoint's Recent deliveries. Organization admins set up webhooks and manage their secrets; members can disable and delete them.

Admins add an endpoint with New: enter its URL and an optional Description, and under Events choose All events, including ones added later or Selected events, by Store (Crawler ready, Crawler failed), Run (Completed, Stopped, Failed, Changes found) and Import (Completed, Failed, Changes found). Then choose Add endpoint. The signing secret is shown once the endpoint is added.

Settings > Connections, with a webhook endpoint and its events

Each endpoint's actions menu holds:

ActionWhat it does
Recent deliveriesThe endpoint's 50 most recent deliveries, with status, attempts, response code and the start of the response body. Admins can Redeliver a finished delivery.
Send test eventSends a test event. Unavailable while the webhook is disabled.
EditChanges the URL, description or events.
Show secretShows the signing secret.
Rotate secretReplaces the signing secret; see Rotating the secret.
Expire old secret nowStops the old secret during a rotation.
Enable / DisableStarts or stops sending events.
DeleteDeletes the webhook and its delivery history.

After a subscription ends, admins and members can still disable and delete a webhook, and admins show or rotate its secret. Adding, editing, enabling, testing and redelivering return an error until the subscription is renewed. Once the organization is suspended, showing and rotating secrets are all that remain.

Through the API, a read-write key of the organization can create, test and delete its webhooks; a read-only key can list and read them. See Authentication.

Create a webhook

curl -s -X POST "https://api.extralt.com/v1/webhooks" \
  -H "Authorization: Bearer $EXTRALT_API_KEY" \
  -H "Idempotency-Key: webhook-create-price-alerts" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.example.com/extralt",
    "event_types": ["run.completed", "run.failed"],
    "description": "Price alerts workflow"
  }'

The response is 201 Created with the webhook and its signing secret:

{
  "id": "pn74h2q9x8c3v1m6z5t0r7wbk2f8djsa",
  "url": "https://hooks.example.com/extralt",
  "description": "Price alerts workflow",
  "event_types": ["run.completed", "run.failed"],
  "enabled": true,
  "created_at": "2026-09-28T08:14:03Z",
  "secret": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
}
  • url must use HTTPS and a public host name, in at most 2,048 characters. These are refused with 400 Bad Request: IP addresses, a user name or password in the URL, localhost, host names without a dot, and host names ending in .localhost, .local, .internal or .home.arpa. A host name that resolves to a private address is refused at each delivery attempt, and the attempt fails.
  • event_types lists the events to send. Omit it to receive every event type, including types added later. An empty list returns 400. An unknown event type returns 422, and so does webhook.test, which cannot be subscribed to: it is sent only on request.
  • description is optional, up to 200 characters.
  • An organization can have up to 100 webhooks. Creating one more returns 409 Conflict. Contact us if you need more.
  • Creating a webhook requires an Idempotency-Key header, which the SDKs send. Like other creates, it returns 402 once a subscription has ended.

List, read, and delete webhooks

# List the organization's webhooks
curl -s "https://api.extralt.com/v1/webhooks" \
  -H "Authorization: Bearer $EXTRALT_API_KEY"

# Read one webhook
curl -s "https://api.extralt.com/v1/webhooks/$WEBHOOK_ID" \
  -H "Authorization: Bearer $EXTRALT_API_KEY"

# Delete a webhook
curl -s -X DELETE "https://api.extralt.com/v1/webhooks/$WEBHOOK_ID" \
  -H "Authorization: Bearer $EXTRALT_API_KEY"

The list response is { "data": [...] } with every webhook, without paging. Webhooks returned by these routes do not include secret. event_types is null for a webhook that receives every event type.

Deleting returns 204 No Content and removes the webhook's delivery history. Events still waiting for a retry are not sent. Deleting works during the grace period after a subscription ends, so you can switch automations off.

The API has no update route. Edit, enable, or disable a webhook on the Connections page, or delete it and create a new one.

Send a test event

curl -s -X POST "https://api.extralt.com/v1/webhooks/$WEBHOOK_ID/test" \
  -H "Authorization: Bearer $EXTRALT_API_KEY"

The response is 202 Accepted with the event's id, { "event_id": "evt_…" }. Extralt then sends a webhook.test event to the endpoint, whatever event types it subscribes to:

{
  "id": "evt_jh71x4q9c2v8m3z6t5r0n9wbf2p7akdq",
  "type": "webhook.test",
  "created_at": "2026-10-13T09:00:00Z",
  "data": {
    "webhook_id": "pn74h2q9x8c3v1m6z5t0r7wbk2f8djsa",
    "message": "This is a test event from Extralt."
  }
}

A test event is signed like any other event but sent only once, without retries. A disabled webhook returns 409 Conflict, and after a subscription ends a test returns 402. Answering a test with 410 Gone deletes the webhook, like any other event; see Removing a webhook from your side.

Receiving events

Each event is a POST with a JSON body and these headers:

HeaderValue
Content-Typeapplication/json
User-AgentExtralt-Webhooks/1.0
webhook-idThe event's id, such as evt_…
webhook-timestampWhen this attempt was sent, in Unix seconds
webhook-signaturev1, followed by the base64 signature

The body is an envelope around the resource:

{
  "id": "evt_kq83n2x7c4v9m1z6t5r0p8wbd3f2hjsa",
  "type": "run.completed",
  "created_at": "2026-09-28T09:02:11Z",
  "data": {
    "id": "kh72p9xq4c8v1m6z3t5r0n8wbd2f4hje",
    "store_id": "example-store.com-US",
    "name": "example-store.com-US_4",
    "status": "completed",
    "finished": true,
    "triggered_by": "schedule",
    "…": "the rest of the Run object"
  }
}
  • id identifies the event for this endpoint. It is the same on every retry and redelivery, so use it to deduplicate. Two webhooks that receive the same event get different ids.
  • type is one of the event types.
  • created_at is when the event occurred, an RFC 3339 timestamp in seconds.
  • data is rendered once, at the first attempt, and every retry sends the same bytes. It reflects the resource at that moment. Read the resource from the API when you need its current state.

Respond quickly

Return any 2xx status within 10 seconds to acknowledge the event. Any other status, a timeout, or a connection error counts as a failure and is retried. Redirects are not followed, so a 3xx response is a failure too.

Acknowledge first and do slow work afterward, for example by putting the event on a queue. The first 1,000 characters of your response body are kept and shown with the delivery under Recent deliveries, which helps when debugging.

Delivery guarantees

Delivery is at least once and in no guaranteed order:

  • The same event can arrive more than once. Deduplicate on id or the webhook-id header.
  • Events can arrive out of order, for example a retried run.failed after the run.completed of the same restarted Run. Use created_at, or read the resource from the API, to decide which state is current.

Verifying signatures

Verify every event before acting on it. The signature is an HMAC-SHA256, keyed with the base64-decoded part of the secret after whsec_, over the string {webhook-id}.{webhook-timestamp}.{body}. Verify against the raw request body, before parsing it as JSON, since re-serializing changes the bytes.

The SDKs' verify_webhook and verifyWebhook do this for you, and return the event typed by its type. In other languages, the Standard Webhooks libraries do. Both reject a timestamp more than five minutes from your clock, which protects against replayed requests.

import os

from extralt import WebhookVerificationError, verify_webhook
from extralt.webhooks import RunWebhookEvent

secret = os.environ["EXTRALT_WEBHOOK_SECRET"]  # whsec_…

def handle(raw_body: bytes, headers: dict[str, str]) -> int:
    try:
        event = verify_webhook(raw_body, headers, secret)
    except WebhookVerificationError:
        return 400  # reject: not from Extralt, or too old
    if isinstance(event, RunWebhookEvent) and event.type == "run.completed":
        print(event.data.status)  # event.data is the Run
    return 204

Rotating the secret

An organization admin can rotate a webhook's secret with Rotate secret, for example when it may have leaked. Under Keep the old secret for, choose 24 hours, 7 days, 1 hour, or Stop now, if the secret leaked. The new secret is shown right away.

Until the old secret stops, every request carries two signatures in webhook-signature, separated by a space: one with the new secret and one with the old. The SDKs and the Standard Webhooks libraries accept a request when any signature matches, so you can switch your stored secret at any point in that window without missing an event. Expire old secret now stops the old secret early. Rotating again during a rotation drops the oldest secret.

Retries

A failed attempt is retried after an increasing wait: 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, and 10 hours. That is eight attempts over about 28 hours. After the last one, the delivery is marked failed.

An admin can redeliver a finished delivery, failed or delivered, from Recent deliveries, with the same id and body. A redelivery is a single attempt, without retries, and needs the webhook to be enabled. Deliveries are kept for 30 days, after which they are deleted; the dashboard lists each endpoint's 50 most recent.

An event whose resource was deleted before its first attempt is not sent, and its delivery is marked failed.

Disabled webhooks

A webhook whose attempts have all failed for five days is disabled. Its Status shows Disabled, failing, and its enabled field becomes false in the API. Disabling a webhook yourself with Disable has the same effect on deliveries:

  • New events are not queued for it, and are never sent later.
  • A retry that comes due while it is disabled is not sent: the delivery is marked failed. After you enable the webhook again, you can redeliver it by hand.

A webhook disabled for failing is deleted, with its delivery history, if it is not enabled again within 30 days.

To recover, fix the endpoint, select Enable, and send a test event. Redeliver the failed deliveries you need, and for events from while it was disabled, list the resources that changed in the meantime from the API, for example finished Runs, and reconcile.

Removing a webhook from your side

Answer any event, including a test or a redelivery, with 410 Gone to say the webhook will never accept events again. Extralt deletes the webhook and its delivery history right away and does not retry. Workflow tools such as Zapier answer 410 once their subscription is deleted, so a webhook left behind by a deleted automation does not count against the limit.

Next steps