Skip to main content
Webhooks let Clay notify your service when a routine run finishes, so you can react without polling. Register a webhook, pass its id when you start a run, and handle the signed POST Clay sends once results are ready.

Register a webhook

Create a webhook with the CLI — run clay webhooks --help for the full command surface (create, list, test, delete):
create returns the signing secret exactly once — store it immediately, it can’t be retrieved later:

Trigger a delivery

Pass the webhook id as webhook_id when you start a routine run (see Routines). Clay sends a signed POST to the webhook URL when the run is ready to read.

Delivery payload

For test events, data is {}. The routine_run_id can identify an inline or a bulk run. If one webhook handles both, store the run mode when you start the run, or use clay routines runs get, which fetches results for either mode.

Verify and fetch results

Clay signs the exact request body with your webhook signing secret and sends it in the X-Clay-Signature header. Verify the signature before trusting a delivery, then fetch the run’s results.
Webhook delivery is not guaranteed. Use webhooks to react faster, but keep polling the run’s results as a fallback.