AnyHook Docs

A webhook relay. Point your sender at AnyHook and get automatic retries, a full event log, unified signature verification, and one-click replay. No SDK required.

Quick Start

AnyHook needs no SDK and no package: you replace the webhook URL in your sender's dashboard, and your handler keeps receiving the same requests. One thing to plan for: retries and replays carry the sender's original timestamp, so where a sender's signature expires (Stripe, Slack and the others with a tolerance on /providers), check AnyHook-Signature to accept them.

Fastest path (no account): run curl -X POST https://anyhook.net/api/v1/quickstart to get a live inbound URL and API key instantly, ideal for AI agents and quick tests. The endpoint expires in 7 days unless claimed via the returned claim_url. Point your sender at the returned inbound_url and read events back with GET /api/v1/events and GET /api/v1/events/{id}; the response's next_steps has each command.

  1. 1
    Create an account
    Go to anyhook.net/sign-up and create a free account. No credit card required.
  2. 2
    Create an App
    An App represents one webhook source. A new account opens on the form: give it a name (e.g. “Stripe Production”) and, optionally, the URL of your server, where AnyHook forwards each event after receiving it. Leave that blank and the app logs everything without forwarding. Add destinations any time, up to 3 per App on Free.
  3. 3
    Point your sender at AnyHook
    The app page shows your inbound URL and where each common sender asks for it (e.g. Stripe → Developers → Webhooks). Paste it there in place of the old webhook URL:
    https://in.anyhook.net/{user-slug}/{app-slug}
    The page is watching: the first request appears on it within seconds. Nothing to send from yet? Press Send a test event on the same page.

Inbound URL Format

Every App gets a unique inbound URL:

https://in.anyhook.net/{user-slug}/{app-slug}
  • user-slug: your account identifier, visible in dashboard settings.
  • app-slug: unique per App, auto-generated from the app name but editable.

The inbound endpoint accepts any POST request, and also answers the URL checks that senders run before saving a URL, even before the app has a destination: Meta's hub.challenge and Dropbox's challenge on a GET, Microsoft Graph's validationToken, and Twitch's webhook_callback_verification. These create no event. Asana's X-Hook-Secret comes back in the response header, and that request is logged and forwarded like any event, because Asana sends the secret only once. A plain GET or HEAD to an app's URL gets 200 and creates no event. Any other method is answered 405. Web pages and plain HTML forms can post to it too (see Code Handlers). AnyHook returns HTTP 200 as soon as the event is durably queued, in about a second, regardless of your destination endpoint's speed, so the sender never waits on it. A query string, or any path after the app's slug, is accepted but neither stored nor forwarded. A query string your handler needs belongs on the destination URL.

On Free, a sender can get 429 with Retry-After: 60 once one of its IPs goes past about 300 requests a minute to one app. The count is approximate, so a short burst can go well past that number before the first refusal. A refused request is not stored, so it arrives only if the sender retries. The app's page shows the refusals. Pro and Scale have no such limit.

Content types. AnyHook keeps a text body, such as application/json, application/x-www-form-urlencoded, XML or plain text, byte-for-byte and forwards it with its original Content-Type. A body that is not valid UTF-8, such as gzip, a legacy charset or a file in a multipart form, reaches your destination intact too. The event log and the API show it as base64 after anyhook-base64-body:, and a code handler or anyhook-mcp listen receives it in that form.

Supported Sources

AnyHook auto-detects the sender from incoming headers and validates the payload signature at the edge. To enable verification, open the App's settings, choose your webhook provider and paste the provider's webhook signing secret (e.g. Stripe's whsec_...).

Highly recommended. Without a signing secret, AnyHook cannot verify that incoming requests genuinely came from your provider. An App set to a named provider still refuses a request without that provider's webhook header and forwards the rest unverified; adding the secret lets AnyHook reject forged requests at the edge before they enter your pipeline.
SourceSignature HeaderAlgorithm
StripeStripe-SignatureHMAC-SHA256 + timestamp
GitHubX-Hub-Signature-256HMAC-SHA256
Meta (Instagram / Facebook / Threads)X-Hub-Signature-256HMAC-SHA256
ShopifyX-Shopify-Hmac-Sha256HMAC-SHA256 (Base64)
DiscordX-Signature-Ed25519Ed25519
SlackX-Slack-SignatureHMAC-SHA256 + timestamp
LINEx-line-signatureHMAC-SHA256 (Base64)
Xerox-xero-signatureHMAC-SHA256 (Base64)
LinearLinear-SignatureHMAC-SHA256
SentrySentry-Hook-SignatureHMAC-SHA256
Vercelx-vercel-signatureHMAC-SHA1
PaddlePaddle-SignatureHMAC-SHA256 + timestamp
SendGridX-Twilio-Email-Event-Webhook-SignatureECDSA P-256
TwilioX-Twilio-SignatureHMAC-SHA1
IntercomX-Hub-SignatureHMAC-SHA1
HubSpotX-HubSpot-Signature-v3HMAC-SHA256 (v3) / SHA-256 (v1/v2)
Standard Webhooks (Svix, OpenAI, Replicate)webhook-signature / Svix-SignatureHMAC-SHA256 + timestamp
ClerkSvix-SignatureHMAC-SHA256 (via Svix)
ResendSvix-SignatureHMAC-SHA256 (via Svix)
Lemon SqueezyX-SignatureHMAC-SHA256
WooCommerceX-WC-Webhook-SignatureHMAC-SHA256 (Base64)
PayPalPAYPAL-TRANSMISSION-SIGRSA-SHA256
Generic / CustomNoneNot verified

Requests that fail the check are rejected at the edge and never reach your endpoint. The app's page counts them, and the first 5 each day are kept in the event log as rejected, headers and body included, so you can see why.

Meta: Instagram, Facebook, Threads

All three are one Graph API webhook contract, so a single App covers them. Meta signs with X-Hub-Signature-256, the same header GitHub uses; AnyHook tells them apart by X-Github-Event, which GitHub always sends and Meta never does.

Meta will not save a callback URL until that URL answers a GET carrying hub.mode=subscribe by echoing hub.challenge back as the entire response body. AnyHook answers it for you, so an inbound URL saves on the first attempt.

In AnyHookIn Meta App Dashboard
Source: MetaApp settings → Basic
App SecretCopy it from there into AnyHook
Verify Token (optional)Webhooks → Verify token: type the same string
Your inbound URLWebhooks → Callback URL: paste it
The Verify Token goes the other way. Every other secret here is copied out of the provider. This one you invent, and then type into Meta. It is not the App Secret and should not be the same string: it arrives in the query string of the setup handshake, and a signing key does not belong in a URL. Leave it blank and the subscription still completes; set it and AnyHook checks it before answering.

Meta retries a failed delivery with decreasing frequency for 36 hours and then drops it. Because AnyHook stores the event before it attempts your endpoint, a deploy or an outage on your side does not consume that window.

How Delivery Works

AnyHook uses an async, queue-based architecture to decouple your webhook sender from your backend:

  1. Edge receive: Cloudflare Workers accepts the POST, validates the signature, and returns 200 once the event is durably stored, in about a second.
  2. Queue: the event is published to a durable message queue (Upstash QStash). The sender's HTTP connection is already closed.
  3. Forward: QStash delivers the event to AnyHook's forwarder, which POSTs the original payload to your destination endpoint.
  4. Log: every step is recorded: inbound headers/body, delivery status, your endpoint's response code and body, latency.
Why this matters. Your sender (Stripe, GitHub, etc.) gets its 200 in about a second. Your backend can then take up to your plan's timeout to respond (60s on Free, 120s on Pro, 5 minutes on Scale), and the sender does not retry, because it already has its 200. Waiting past the first second uses your compute allowance.
Payload size limit. Maximum payload per event: 512 KB (Free), 2 MB (Pro), 4 MB (Scale), custom (Enterprise). Oversized requests are rejected at the edge with 413 Payload Too Large, never silently dropped, never billed. The app's page counts them.
Delivery model. By default AnyHook forwards events as they arrive, with no delay and no concurrency cap. On Pro and above a destination can set a per-second rate limit and a first-attempt delay. If your endpoint returns 429, AnyHook backs off and retries.

Delivery Guarantees

The contract, stated plainly, because a relay that is vague about its guarantees pushes the vagueness into your code:

  1. At-least-once, not exactly-once. Retries are the product, and a retry after a lost response is indistinguishable from a new delivery. You will occasionally receive the same event twice; no relay can promise otherwise, and the ones that do are describing their happy path. Your handler must be idempotent, and the event id we forward in X-AnyHook-Delivery is the key to deduplicate on.
  2. No ordering guarantee. Retries and concurrent delivery mean a later event can land before an earlier one that is still being retried. Most senders make no ordering promise upstream of us either. Order by a field inside the payload (a version, an updated_at), never by arrival time.
  3. Do not deduplicate on the signature. AnyHook-Signature is re-signed with a fresh timestamp on every attempt, on purpose, so retries never fail your tolerance window. Two deliveries of the same event carry different signatures; the event id is what stays constant.
  4. Accepted means durable. The edge returns 200 only after the event is persisted, and there are two fallback stores behind the queue before it would answer 503 instead. A 503 from the inbound URL means nothing was stored, and your sender's own retry is the safety net, which is the reason we answer 503 rather than pretending.
The practical version. Write the handler so that processing the same event twice is harmless, and treat arrival order as noise. We wrote up the patterns, ranked by how much they protect you, in You Received the Same Webhook Twice. That's the Contract, Not a Bug.

Retry Schedule

When your destination returns a retryable error or times out, AnyHook automatically retries using exponential backoff:

AttemptDelayPlan
1ImmediateAll
25 minutes laterAll
330 minutes laterAll
43 hours laterPro, Scale, Enterprise
518 hours laterPro, Scale, Enterprise
6-1024 hours later, eachScale, Enterprise
Delivery timeout. AnyHook waits up to 60s (Free), 120s (Pro), or 5 minutes (Scale+) for your endpoint to respond. If your handler needs even more time, for example, a multi-step AI agent, return HTTP 202 Accepted immediately and process asynchronously. AnyHook marks delivery as successful on 202.

Which responses trigger retries?

Not all errors are retryable. AnyHook classifies your endpoint's response so it does not spend attempts, or your compute allowance, on errors that trying again won't fix:

Status CodeActionWhy
2xxSuccess: delivery completeYour endpoint accepted the event.
3xxTerminal: marked failed immediatelyRedirects are not followed; give the destination its final URL.
408 Request TimeoutRetry with backoffTemporary timeout, may succeed on next attempt.
429 Too Many RequestsRetry with backoffYour endpoint is rate limiting, give it time.
4xx (other: 400, 401, 403, 404, 422…)Terminal: marked failed immediatelyClient error, the request is malformed or unauthorized. Retrying the same payload won't help.
5xxRetry with backoffServer error, likely temporary.
Network error / timeoutRetry with backoffYour endpoint was unreachable.
Why 4xx is terminal. A 400 Bad Request or 422 Unprocessable Entity means your handler rejected the payload, and retrying it won't change the outcome. Marking it failed at once means you hear sooner, no compute allowance goes on retries, and you can replay the event once you've fixed your handler.

Each attempt is logged with the full response body and status code. Both 4xx terminal failures and retryable failures count toward the circuit breaker, 20 consecutive failures of any kind will trip it.

Failure notifications

AnyHook sends email alerts at specific thresholds rather than per event, so your inbox stays manageable:

  • 1st failure: immediate alert with status code and destination.
  • 5th consecutive failure: escalation alert with suggestions.
  • 20th consecutive failure: circuit breaker trips (see below), CB alert sent.

One email at each threshold above, then one at each circuit-breaker step (every pause and the deactivation), never one per event. Any single successful delivery resets the counter.

Circuit Breaker

If AnyHook detects 20 consecutive delivery failures to the same destination (including terminal 4xx), the circuit breaker trips and begins a progressive escalation:

TripPause durationWhat happens
110 minutesDestination paused, email sent
230 minutesDestination paused, email sent
32 hoursDestination paused, email sent
424 hoursDestination paused, email sent
5PermanentDestination deactivated, email sent

How it works

  • Inbound keeps receiving. Your inbound URL stays active at all times, events from Stripe, GitHub, etc. are still accepted and stored. Only outbound delivery to your destination is paused.
  • After each pause expires, AnyHook sends a half-open probe, the next event tests your destination. If it succeeds, the circuit closes and everything resets.
  • Any single success resets everything: consecutive failure count and trip count both go back to zero.
  • Events received during a pause are stored with status circuit_open and can be replayed once your destination recovers.
  • You receive an email notification at each escalation step, including the destination URL, failure count, and pause duration.
  • If the destination is deactivated (Trip 5), you must manually re-enable it from the dashboard.

This progressive approach gives your server time to recover while sparing your compute allowance the retries a dead endpoint would burn.

Event Log

Every event that reaches your inbound URL is recorded, whatever happens to its delivery. The log starts when you point the provider at AnyHook: an event that failed before then exists only at the provider (for Stripe, see how to replay a webhook). Each log entry includes:

  • Full inbound headers and body (as received from the sender)
  • Delivery status: queued → success / retrying / failed / rejected / circuit_open / quota_exceeded. rejected means AnyHook refused the event (signature verification failed, or the destination URL was blocked); it was never attempted and cannot be replayed.
  • Your destination's HTTP response code and body (per attempt)
  • Latency in milliseconds
  • Attempt count and next retry time
  • Whether the event is a replay (isReplay: true)

How long events are kept depends on the plan. Free: 3 days, replayable the whole time, then deleted. Pro: 1 year: replayable for 30 days, then a read-only encrypted archive. Scale: 7 years: replayable for 90 days, then a read-only encrypted archive. Enterprise: Flexible.

A paused app keeps nothing. While an app is paused (is_active: false), its inbound URL answers 202 and stores nothing, so the provider does not disable the endpoint but the events are gone. Un-pause it before traffic you need arrives.

Dashboard Replay

Any event in the log can be replayed from the dashboard with one click. A replay re-sends the stored payload byte-for-byte to the destination the event went to, or to that destination's new URL if you have changed it since.

  • Navigate to Dashboard → Events
  • Find the event and click Replay
  • A new event is created with isReplay: true, linked to the original
Quota. Replays do not count against your monthly event quota, except the replay of a held (quota_exceeded) event, which counts once, like a new event. A replay to an app's code counts as a code run.

API Replay (Single Event)

POST/api/v1/events/{id}/replayReplay a single event by ID

Publishes the original event payload to QStash for re-delivery. The new event is linked to the original via replayOf.

curl -X POST https://anyhook.net/api/v1/events/{event_id}/replay \
  -H "Authorization: Bearer {api_key}"

Returns 200 with the new event ID on success. Returns 410 Gone if the event is past its replay window.

Undelivered Events

GET/api/v1/apps/{slug}/events/undeliveredList events that failed to deliver

Returns events with status failed, circuit_open, or quota_exceeded.

ParamTypeDefaultDescription
sinceISO 860124h agoOnly events created after this timestamp
limitinteger100Max events to return (1-200)
curl "https://anyhook.net/api/v1/apps/stripe-prod/events/undelivered?since=2026-04-11T00:00:00Z&limit=50" \
  -H "Authorization: Bearer {api_key}"
{
  "count": 3,
  "events": [
    { "id": "evt_abc", "status": "failed", "createdAt": "..." },
    ...
  ]
}

Batch Replay

POST/api/v1/apps/{slug}/replay-failedReplay an app's failed events

Replays the failed events that match, oldest first, up to the limit per call. Events that already have a replay, or are past the replay window, are skipped.

Body ParamTypeDefaultDescription
sinceISO 860124h agoOnly replay events created after this timestamp
limitinteger50Max events to replay (1-100)
curl -X POST https://anyhook.net/api/v1/apps/stripe-prod/replay-failed \
  -H "Authorization: Bearer {api_key}" \
  -H "Content-Type: application/json" \
  -d '{"since": "2026-04-11T00:00:00Z", "limit": 100}'
{
  "replayed": 3,
  "events": [
    { "original_id": "evt_abc", "new_id": "evt_xyz" },
    ...
  ]
}
Daily replay limit. Free: 100/day, Pro: 500/day, Scale: 1,000/day, Enterprise: unlimited.

Local Development

Three ways to get webhooks on your machine:

1. One command

Prints a public URL and forwards every event to a port on your machine. No account, no tunnel, and the URL stays the same when you restart it.

npx -y anyhook-mcp listen 3000
# or with a path
npx -y anyhook-mcp listen 3000/api/webhooks

Paste the URL into your provider. Your server gets the bytes the provider sent, so signatures verify. A retry or replay keeps the provider's original timestamp, so a check that refuses old timestamps, like Stripe's default, needs a longer tolerance locally. A 5xx from your server is retried, and events that arrive while it is stopped are logged so you can replay them. It needs Node 22 or newer. With ANYHOOK_API_KEY set it uses that account, and --app picks the app. It only forwards webhooks: the sender gets its answer from AnyHook, so your server's response goes to the event log.

2. Live forwarding via tunnel

Use a tunnel when the sender needs your server's response, or you need more than webhooks. Set your App's destination to a tunnel URL that points to your local machine. Any tunnel provider works:

# ngrok
ngrok http 3000
# → https://abc123.ngrok.io

# cloudflared
cloudflared tunnel --url http://localhost:3000

# localhost.run
ssh -R 80:localhost:3000 nokey@localhost.run

Copy the tunnel URL into your App's destination in the dashboard. AnyHook forwards webhooks there exactly like any other endpoint, retries, logging, and signature headers all work the same.

Tip. Keep your provider pointed at your production inbound URL (https://in.anyhook.net/you/app) while developing. You get real events captured in your log, and you can switch destinations between tunnel and production without touching Stripe.

3. Capture & replay to localhost

Let real production events accumulate in AnyHook, then replay any of them to your local environment whenever you need. No need to trigger test events manually, test against real payloads, as often as your daily replay limit allows.

  • Start anyhook-mcp listen, or switch your destination to your tunnel URL
  • Open Dashboard → Events and click Replay on any event
  • Or use the API: POST /api/v1/events/{id}/replay
  • The original payload is sent byte-for-byte to your current destination

This is especially useful for debugging edge cases, find the problematic event in production logs, replay it locally, and iterate until your handler works correctly.

Replays skip the quota. Replays do not count against your monthly event quota. They use the compute allowance and a daily replay limit (100 on Free, 500 on Pro, 1,000 on Scale).

Encryption at Rest

All webhook payload data is encrypted at rest using AES-256-GCM before it reaches the database. This includes inbound headers, request bodies, and per-destination signing secrets.

Encryption uses a dedicated key (AES_SECRET_KEY) that is stored separately from the database credentials. A database breach without the encryption key yields only ciphertext for webhook payloads, signing secrets and custom header values. Your account email and destination URLs are not encrypted.

What's encrypted

  • Webhook request headers & body (every event)
  • Provider signing secrets (Stripe webhook secret, etc.)
  • Per-destination AnyHook signing secrets
Payloads and signing secrets are encrypted in the database. Every webhook payload, signing secret and custom header value is AES-256-GCM encrypted before storage. Even with full database access, an attacker sees those only as ciphertext.

Edge Verification

AnyHook validates webhook signatures at the Cloudflare edge, before the event enters the queue. Once an app has its signing secret, a request with a missing or invalid signature is refused with a 401 and never costs you quota; without a secret, an App set to a named provider still refuses a request without that provider's webhook header and forwards the rest unverified.

Signature detection is automatic based on headers. When you create an App and select a source type, AnyHook stores the signing secret (encrypted at rest) and uses the correct algorithm for that provider.

Invalid requests. Requests that fail signature validation are rejected with HTTP 401 and never reach your destination. The app's page counts them, and the first 5 each day are kept in the event log, headers and body included.

Unsupported or custom sources

If your webhook source isn't in the supported list, leave your App on Generic, the default. AnyHook will:

  • Accept and queue every inbound POST, no inbound signature check.
  • Forward the body byte-for-byte and the provider's original headers to your destination, plus a fresh AnyHook-Signature on every attempt. Infrastructure headers added in front of our edge (cf-* and friends) are stripped.
  • Attach an AnyHook-Signature header so your endpoint can still verify the request came through AnyHook.

A Generic app has no inbound signature check, whatever secret is set. AnyHook-Signature proves a request came through AnyHook, not who sent it to AnyHook, so keep your own check on the sender's original header (forwarded untouched) if you need that. If the sender signs with Standard Webhooks (webhook-id, webhook-timestamp, webhook-signature, as OpenAI and Replicate do), choose that source instead: it is verified at the edge.

AnyHook-Signature

Every forwarded request includes an AnyHook-Signature header, a timestamped HMAC-SHA256 signature generated with your destination's signing secret.

AnyHook-Signature: t=1712934567,v1=5257a869...

To verify on your server:

// Node.js / TypeScript
import crypto from "crypto";

function verifyAnyHook(header: string, body: string, secret: string): boolean {
  const [tPart, vPart] = header.split(",");
  const timestamp = Number(tPart?.replace("t=", ""));
  // Re-signed on every attempt, so a genuine signature is never older than this.
  if (!timestamp || Math.abs(Date.now() / 1000 - timestamp) > 300) return false;
  const signature = Buffer.from(vPart?.replace("v1=", "") ?? "", "hex");

  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${timestamp}.${body}`)
    .digest();

  // timingSafeEqual throws on a length mismatch, so check that first.
  return signature.length === expected.length && crypto.timingSafeEqual(signature, expected);
}

The signing secret is generated per-destination and available in your dashboard under App → Destinations → Signing secret. You can rotate it at any time via the API.

Custom Headers

You can attach custom headers to outbound requests on a per-destination basis. Common use cases:

  • Authorization: Bearer ...: authenticate with your API
  • x-api-key: ...: API key authentication
  • Any arbitrary header your endpoint requires

Custom header values are encrypted at rest and never exposed in the event log. Configure them in App → Destinations → Custom headers.

Original headers preserved. The original provider headers (Stripe-Signature, etc.) are forwarded byte-for-byte alongside your custom headers and AnyHook-Signature, so your existing SDK check passes on the first delivery. Retries and replays carry the provider's original timestamp, which Stripe's SDK rejects after 5 minutes by default: check AnyHook-Signature instead, which is signed fresh on every attempt.

Delivery Controls

Three optional settings on each destination, all on Pro and above. Set them in App → Destinations → Delivery controls, or with PATCH /api/v1/apps/{slug} on the destination object. A Free account keeps controls it set while paid, but cannot change them.

{
  "destinations": [{
    "url": "https://api.example.com/hooks/stripe",
    "event_types": ["invoice.*", "checkout.session.completed"],
    "rate_limit": 20,
    "delay_seconds": 5
  }]
}

Event Type Filters

event_types is a list of patterns; the destination only receives events whose type matches one of them. * matches any run of characters, so invoice.* is every invoice event and checkout.session.completed is exactly one. Matching is case-insensitive over the whole type. With two destinations you can fan out by type: billing events to one service, everything else to another.

  • Decided at the edge, after signature verification and before the quota counter: a filtered event is not stored, not delivered, and does not count.
  • The sender gets 200 {"filtered":true,"event_type":"…"}, which Stripe and Shopify show in their own webhook logs.
  • Where the type comes from is per provider: a header for GitHub, Shopify, WooCommerce and Lemon Squeezy; the body's type for Stripe, Clerk, Resend, Vercel and Svix-style senders; event_type for Paddle and PayPal. It is the same value the event log shows in its Type column.
Unknown types are always delivered. An event whose type AnyHook cannot read (a generic body with no type field, a provider ping) is delivered to every destination regardless of filters. The relay's promise is that nothing is lost; a filter that ate the unknown would break it.

Rate Limit

rate_limit caps deliveries to a destination at that many per second (1 to 1,000). Events past the cap wait in the queue and go out in order as capacity frees up; nothing is dropped and retries count against the same cap. Use it when a sender can burst faster than your server can absorb: a Shopify bulk product update, a Stripe subscription renewal wave at the start of the month, a GitHub monorepo push fanning out to many CI events.

Bulk replay respects the limit too, which is exactly when it matters most: replaying 500 failed events at 20 per second is 25 seconds of steady traffic instead of one spike that fails again.

Delivery Delay

delay_seconds holds the first delivery attempt (1 second to 1 day). The usual reason is a sender whose webhook races its own API: Stripe's checkout.session.completed can arrive before your success page has finished writing the order, and a five-second delay turns a race into a non-event. Replays are never delayed; the retry schedule after the first attempt is unchanged.

Slack / Discord Alerts

On Pro and above, every alert AnyHook emails is also posted to an incoming webhook you set once in Settings → Notifications: delivery failures (1st and 5th consecutive), circuit-breaker trips and deactivations, reject storms and their resolution, and the 50% / 90% / 100% quota notices. Saving the URL posts a test message so you know it landed. Slack, Discord, Mattermost, Rocket.Chat and the Teams incoming-webhook connector all work; the payload is {"text": …} (or content for Discord). Turning "Email alerts and reminders" off silences email only; the channel keeps getting alerts.

Code Handlers

On Pro and Scale, an app can run your own code on every event it receives, in a sandbox, with no server of your own. Saving code gives the app a destination that runs it, so retries, replay, the circuit breaker and the event log work as they do for any destination, and each run's console output and return value are that delivery's response. Write it in the app's Code section or with the endpoints below. Templates for common actions are at /code-templates.md, and moving from Pipedream has its own guide.

export default async function (event, { env, store }) {
  // event: { method, headers, body, raw_body, delivery_id, attempt }
  console.log(event.body);
}
  • The event. body is parsed JSON, form fields (urlencoded, or the text fields of a multipart form) or the raw text, and raw_body is the text as received. method is always POST; the query string, the path and the caller's IP are not passed to your code. delivery_id is the event's X-AnyHook-Delivery id, and attempt counts from 1, with 0 on a test run.
  • Failures. Throwing fails the delivery, which is retried on the plan's attempts (Retry Schedule). A retry of an event whose run succeeded does not run it again, but a run that failed after a call went through does, so key such calls to delivery_id where the API allows it.
  • Pipedream steps. export default defineComponent({ async run({ steps, $ }) {} }) runs too: steps.trigger.event is the event above, $.export and $.flow.exit work, every data_store prop is the app's store, an app prop's $auth.field reads the secret APP_FIELD, and any other prop reads the secret named after it (channelId reads CHANNEL_ID). The Pipedream guide lists what does not carry over.
  • npm packages. What the code imports is installed when you save, pinned the Pipedream way (import axios from "axios@1.7.9"), up to 20 packages. A save that installs new packages can take a few minutes; a failed install saves nothing.
  • Secrets. Read as env.NAME or process.env.NAME, up to 20, named with letters, digits and underscores, not starting with a digit. PATH, HOME, NODE_OPTIONS, NODE_PATH, PWD and names starting with ANYHOOK_ belong to the runtime, and a value is at most 4,000 characters. Values never leave the server.
  • The store. store.get, set (with { ttl } in seconds), has, delete, keys, entries and clear keep state between events, one store per app: up to 1,000 keys of up to 256 characters, each value at most 64,000 bytes as JSON. An import takes {"entries": {key: value}}, overwrites keys that exist and sets them without TTLs.
  • Schedules. schedule is five cron fields, UTC unless prefixed CRON_TZ=Area/City. Each firing posts an anyhook.schedule event to the app's own URL, so it counts as a run and as an event, and it fires only while the code is on. The app's source must be generic or auto, with no signing secret: give scheduled code an app of its own.
  • Email. Every app also takes mail at {user-slug}.{app-slug}@anyhook.net, as an email.received event whose body has from, to, subject, message_id, date, size and the MIME message as raw. Like a schedule, it needs an app whose source is generic or auto with no signing secret, and mail over the plan's payload limit is bounced.
  • Web pages and forms. A page can fetch() the inbound URL: the edge answers the CORS preflight, and every answer carries Access-Control-Allow-Origin: *. A plain HTML form needs method="post". Add ?redirect=https://your-site.com/thanks to its action and a stored event sends the visitor there with a 303, as long as that address is on the site the form was posted from; otherwise the visitor sees a short "Received" page. Text fields arrive in event.body; uploaded files do not survive.
  • Limits. Code is at most 64,000 bytes, and a run may take 105 s on Pro and 285 s on Scale. A run keeps the last 16,000 characters of its console output. The month's runs are in the plan table, and every run counts, retries, test runs, replays and schedule firings included. There is no overage: past the month's runs a delivery to the code answers 429 and is held (circuit_open), not retried, ready to replay once the month turns or the plan grows.
  • Testing, on and off. POST .../code/test runs the saved code on the app's latest stored event, an event_id, or a body you pass, and answers with its logs, return value and duration. It counts as a run and delivers nothing, but whatever the code itself sends does happen. Events run the code only while it is on. The dashboard saves new code switched off, while PUT .../code saves a first version live unless you pass "enabled": false; a later save keeps the current state. While another destination still handles the same events, as during a migration, save with "enabled": false and turn the code on after you remove that destination. Either change takes up to a minute to reach every edge location.
GET/api/v1/apps/{slug}/codeThe code, its secret names, schedule and packages, whether events reach it, and runs used this month
PUT/api/v1/apps/{slug}/codeSave code, secrets (merged; null removes one), schedule (null removes it) and enabled
DELETE/api/v1/apps/{slug}/codeRemove the code, its secrets and its schedule
POST/api/v1/apps/{slug}/code/testRun the saved code now, on a stored event or a body you pass
GET/api/v1/apps/{slug}/storeEvery live key in the app's store
POST/api/v1/apps/{slug}/storeImport keys: {"entries": {key: value}}
DELETE/api/v1/apps/{slug}/storeRemove one key with ?key=, or every key

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer ahk_live_xxxxxxxxxxxxxxxx

Generate API keys from Dashboard → Settings → API Keys. Keys are scoped to your account, give full access or read-only access (you choose when you create one), and can be revoked at any time. An app connected through MCP sign-in (anyhook.net/mcp) can call the same endpoints with its OAuth access token, within the access you approved.

Rate limits. API and MCP calls are limited per account per UTC day: 300 on Free, 1,000 on Pro, 3,000 on Scale. Past the limit you'll receive 429 Too Many Requests with a Retry-After header until 00:00 UTC.

AI agents (MCP)

AnyHook is an MCP server at https://anyhook.net/mcp, so an agent can create apps, read the event log and replay failures for you, and on Pro and Scale deploy and test an app's code (anyhook_code_deploy, anyhook_code_test, anyhook_code_get). Claude Code, claude.ai, Codex and VS Code connect with the URL and a browser sign-in, no key to copy: the steps for each.

Cursor, Windsurf and Claude Desktop use a key. Create one under Dashboard → Settings → API Keys, which shows this with your key already in it:

{
  "mcpServers": {
    "anyhook": {
      "command": "npx",
      "args": [
        "-y",
        "anyhook-mcp"
      ],
      "env": {
        "ANYHOOK_API_KEY": "ahk_live_xxxxxxxxxxxxxxxx"
      }
    }
  }
}

Cursor: Settings → MCP → Add new MCP server, or ~/.cursor/mcp.json. Windsurf: ~/.codeium/windsurf/mcp_config.json. Claude Desktop: Settings → Developer → Edit Config. The code tools need anyhook-mcp 0.4.0 or later, which npx -y fetches, or the server at https://anyhook.net/mcp.

Then ask it: “Create an AnyHook app for my Stripe webhooks and give me its URL.” Agents can read all of this in /llms.txt.

Apps

GET/api/v1/appsList all apps
POST/api/v1/appsCreate a new app
PATCH/api/v1/apps/{slug}Update an app (a destinations array replaces the whole list)
POST/api/v1/apps/{slug}/destinationsAdd one destination and leave the others as they are
POST/api/v1/apps/{slug}/destinations/{index}/rotate-secretRotate a destination's signing secret
DELETE/api/v1/apps/{slug}Delete an app

Create an app:

curl -X POST https://anyhook.net/api/v1/apps \
  -H "Authorization: Bearer {api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Stripe Production",
    "source": "stripe",
    "destination_url": "https://api.example.com/webhooks"
  }'
{
  "id": "app_xxxxx",
  "name": "Stripe Production",
  "slug": "stripe-production",
  "inbound_url": "https://in.anyhook.net/you/stripe-production",
  "destinations": [
    { "url": "https://api.example.com/webhooks", "enabled": true }
  ]
}

Connect Stripe or GitHub

POST/api/v1/connectRegister an app's URL at the provider with its own key

Give a Stripe key or a GitHub token and AnyHook adds the app's inbound URL as a webhook at the provider, saves the signing secret it yields, and checks signatures from the first event. The provider is read from the key. The key is used for these calls and not stored. Without app, a new app is created. Running it again with app set to that app replaces the registration rather than adding a second one.

Least privilege is enough: a Stripe restricted key with Webhook Endpoints: Write, or a fine-grained GitHub token with Webhooks: Read and write on the repository.

# Stripe: a restricted key, connecting an existing app
curl -X POST https://anyhook.net/api/v1/connect \
  -H "Authorization: Bearer {api_key}" \
  -H "Content-Type: application/json" \
  -d '{ "key": "rk_live_...", "app": "payments" }'

# GitHub: name the repository (or an organization); no app, so one is created
curl -X POST https://anyhook.net/api/v1/connect \
  -H "Authorization: Bearer {api_key}" \
  -H "Content-Type: application/json" \
  -d '{ "key": "github_pat_...", "target": "acme/api" }'

GitHub sends a signed ping as soon as the hook exists, so the first event shows up within seconds. Other providers: create the app with POST /api/v1/apps and paste its inbound URL into their webhook settings.

Events

GET/api/v1/eventsList event summaries, newest first (no payloads)
GET/api/v1/events/{id}Get event details including full payload

Query parameters for listing:

ParamTypeDescription
app_slugstringFilter by app slug
statusstringFilter by status (queued, success, retrying, failed, rejected, circuit_open, quota_exceeded)
limitintegerMax results (default 50, max 200)

Replay (API)

POST/api/v1/events/{id}/replayReplay a single event

See API Replay above for full details and examples.

Undelivered (API)

GET/api/v1/apps/{slug}/events/undeliveredList failed/undelivered events

See Undelivered Events above for full details and examples.

Batch Replay (API)

POST/api/v1/apps/{slug}/replay-failedReplay all failed events for an app

See Batch Replay above for full details and examples.

Plan Limits

FreePro ($20/mo)Scale ($90/mo)Enterprise
Events/month10,00050,000250,000Flexible
Daily cap1,000NoneNoneNone
Apps11050Flexible
Destinations per app32050Flexible
Delivery attempts3510Flexible
History3 days1 year7 yearsFlexible
Replayable for3 days30 days90 daysUp to 365 days
Delivery timeout60s120s5 minFlexible
Max payload512 KB2 MB4 MBCustom
OverageNone$0.15/1k$0.17/1kContract
Daily replay limit1005001,000Unlimited
Code runs/monthNone3,00012,000Flexible
Code run timeNone105s285sFlexible
Compute allowance$0.15 a month$3.00 a month$11.00 a monthFlexible
API and MCP calls300 a day1,000 a day3,000 a dayFlexible

See full pricing details →

Usage & Quotas

AnyHook tracks usage on a natural month basis (e.g. “2026-04”). The counter resets at the start of each calendar month.

  • One per delivery: an event sent to two destinations counts as two, and a large one counts once per started 64 KB of body and headers. An event on an app with no destination counts once. Events a filter drops and events that fail signature verification don't count. The Free daily cap is simpler: it counts each request the edge accepts once, however many destinations it goes to.
  • First attempt only: retries don't count against your quota.
  • Replays don't count: events with isReplay: true are excluded from billing, except the replay of an event held past your quota, which counts once, like a new event. They use the compute allowance and your plan's daily replay limit.
  • Compute allowance: what AnyHook spends on your account beyond each event's first attempt, at cost: retries, replays, code runs, package installs, schedule firings, outage drills, and waiting on a destination past its first second (a retry of a 1 KB event uses about $0.00002 of it, a code run of a few seconds about $0.0008). Past it those stop until the 1st (UTC): a failed delivery is not retried, replays and code runs are refused, schedules pause, and a destination gets one second to answer. Events still arrive and get their first attempt.
  • API and MCP calls: each call made with an API key or an MCP client counts one, and an answer over 32 KB counts one per started 32 KB; the dashboard doesn't count. Past the day's limit the API answers 429 with Retry-After until 00:00 UTC. GET /api/v1/usage (or anyhook_usage over MCP) shows every limit and what has used it.
  • Held, not dropped: past your included events (and past your overage cap, if you set one) each event is recorded with status quota_exceeded and not delivered. Upgrade or set a cap, then replay them in one click from the dashboard. Held events go up to 20% of the quota past what the cap buys; past that the edge refuses with a 429 and stores nothing, as a bound on a runaway source.
Free tier limit. Events over the daily cap (1,000) are refused at the edge. Events over the monthly cap (10,000) are held, up to a further 20% of it: they appear in your event log with status quota_exceeded and can be replayed after upgrading. Past that they are refused like the daily cap. Upgrade to Pro for metered overage.
Paid tier overage. Pro bills overage at $0.15/1k events, Scale at $0.17/1k, rounded up to the nearest cent, once you have set an overage cap. Without a cap, events past the quota are held for replay and refused once the hold is full.

Overage Billing

When your monthly quota runs out, overage billing lets events keep flowing instead of being held. Available on Pro and Scale plans only.

How it works

  1. Set a monthly spending cap in Settings ($5 / $10 / $20 / $50, or Off).
  2. Once your plan's event quota is reached, AnyHook checks whether overage is enabled and your cap isn't exhausted.
  3. If allowed, the event is delivered normally and tagged as overage.
  4. At the start of the next month, overage is billed as a single line item on your Stripe invoice, $0.15 per 1,000 events on Pro, $0.17 per 1,000 events on Scale (per-event, rounded up to the cent), capped at your spending limit.

Per-app toggle

Each app has an overage setting: Inherit default, Enabled, or Disabled. By default, apps inherit your account-level setting. Override per-app in App Settings → Overage Billing.

Account default

In Settings → Overage Billing, a spending cap above Off turns overage on for every app set to Inherit default, existing apps included; apps set to Disabled stay off.

Spending cap is a hard limit. Once your overage cost reaches the cap, further events are not delivered: each is stored as quota_exceeded and replayable once you raise the cap or the month resets. Nothing past the cap is billed. Past the cap, events are held up to another 20% of the quota; the edge refuses the rest with a 429 and stores nothing.

API Keys

API keys authenticate your requests to the AnyHook REST API. Manage them from Dashboard → Settings → API Keys.

  • Keys are prefixed with ahk_live_ for production.
  • You can create multiple keys and label them (e.g. “CI/CD”, “Agent”).
  • Revoke a key instantly, revoked keys return 401 on next use.
  • Keys are shown only once on creation. Store them securely.
GET/api/v1/api-keysList all API keys (secrets masked)
POST/api/v1/api-keysCreate a new API key
PATCH/api/v1/api-keys/{id}/revokeRevoke an API key

Need help?

Email us at hello@anyhook.net: we respond to every message. Check status.anyhook.net for live service health.