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.
- 1Create an accountGo to anyhook.net/sign-up and create a free account. No credit card required.
- 2Create an AppAn 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.
- 3Point your sender at AnyHookThe 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.
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_...).
| Source | Signature Header | Algorithm |
|---|---|---|
| Stripe | Stripe-Signature | HMAC-SHA256 + timestamp |
| GitHub | X-Hub-Signature-256 | HMAC-SHA256 |
| Meta (Instagram / Facebook / Threads) | X-Hub-Signature-256 | HMAC-SHA256 |
| Shopify | X-Shopify-Hmac-Sha256 | HMAC-SHA256 (Base64) |
| Discord | X-Signature-Ed25519 | Ed25519 |
| Slack | X-Slack-Signature | HMAC-SHA256 + timestamp |
| LINE | x-line-signature | HMAC-SHA256 (Base64) |
| Xero | x-xero-signature | HMAC-SHA256 (Base64) |
| Linear | Linear-Signature | HMAC-SHA256 |
| Sentry | Sentry-Hook-Signature | HMAC-SHA256 |
| Vercel | x-vercel-signature | HMAC-SHA1 |
| Paddle | Paddle-Signature | HMAC-SHA256 + timestamp |
| SendGrid | X-Twilio-Email-Event-Webhook-Signature | ECDSA P-256 |
| Twilio | X-Twilio-Signature | HMAC-SHA1 |
| Intercom | X-Hub-Signature | HMAC-SHA1 |
| HubSpot | X-HubSpot-Signature-v3 | HMAC-SHA256 (v3) / SHA-256 (v1/v2) |
| Standard Webhooks (Svix, OpenAI, Replicate) | webhook-signature / Svix-Signature | HMAC-SHA256 + timestamp |
| Clerk | Svix-Signature | HMAC-SHA256 (via Svix) |
| Resend | Svix-Signature | HMAC-SHA256 (via Svix) |
| Lemon Squeezy | X-Signature | HMAC-SHA256 |
| WooCommerce | X-WC-Webhook-Signature | HMAC-SHA256 (Base64) |
| PayPal | PAYPAL-TRANSMISSION-SIG | RSA-SHA256 |
| Generic / Custom | None | Not 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 AnyHook | In Meta App Dashboard |
|---|---|
| Source: Meta | App settings → Basic |
| App Secret | Copy it from there into AnyHook |
| Verify Token (optional) | Webhooks → Verify token: type the same string |
| Your inbound URL | Webhooks → Callback URL: paste it |
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:
- Edge receive: Cloudflare Workers accepts the POST, validates the signature, and returns 200 once the event is durably stored, in about a second.
- Queue: the event is published to a durable message queue (Upstash QStash). The sender's HTTP connection is already closed.
- Forward: QStash delivers the event to AnyHook's forwarder, which POSTs the original payload to your destination endpoint.
- Log: every step is recorded: inbound headers/body, delivery status, your endpoint's response code and body, latency.
413 Payload Too Large, never silently dropped, never billed. The app's page counts them.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:
- 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-Deliveryis the key to deduplicate on. - 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. - Do not deduplicate on the signature.
AnyHook-Signatureis 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 eventidis what stays constant. - 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.
Retry Schedule
When your destination returns a retryable error or times out, AnyHook automatically retries using exponential backoff:
| Attempt | Delay | Plan |
|---|---|---|
| 1 | Immediate | All |
| 2 | 5 minutes later | All |
| 3 | 30 minutes later | All |
| 4 | 3 hours later | Pro, Scale, Enterprise |
| 5 | 18 hours later | Pro, Scale, Enterprise |
| 6-10 | 24 hours later, each | Scale, Enterprise |
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 Code | Action | Why |
|---|---|---|
| 2xx | Success: delivery complete | Your endpoint accepted the event. |
| 3xx | Terminal: marked failed immediately | Redirects are not followed; give the destination its final URL. |
| 408 Request Timeout | Retry with backoff | Temporary timeout, may succeed on next attempt. |
| 429 Too Many Requests | Retry with backoff | Your endpoint is rate limiting, give it time. |
| 4xx (other: 400, 401, 403, 404, 422…) | Terminal: marked failed immediately | Client error, the request is malformed or unauthorized. Retrying the same payload won't help. |
| 5xx | Retry with backoff | Server error, likely temporary. |
| Network error / timeout | Retry with backoff | Your endpoint was unreachable. |
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:
| Trip | Pause duration | What happens |
|---|---|---|
| 1 | 10 minutes | Destination paused, email sent |
| 2 | 30 minutes | Destination paused, email sent |
| 3 | 2 hours | Destination paused, email sent |
| 4 | 24 hours | Destination paused, email sent |
| 5 | Permanent | Destination 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_openand 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.rejectedmeans 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.
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
API Replay (Single Event)
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
Returns events with status failed, circuit_open, or quota_exceeded.
| Param | Type | Default | Description |
|---|---|---|---|
| since | ISO 8601 | 24h ago | Only events created after this timestamp |
| limit | integer | 100 | Max 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
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 Param | Type | Default | Description |
|---|---|---|---|
| since | ISO 8601 | 24h ago | Only replay events created after this timestamp |
| limit | integer | 50 | Max 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" },
...
]
}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.
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.
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
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.
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-Signatureheader 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 APIx-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.
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
typefor Stripe, Clerk, Resend, Vercel and Svix-style senders;event_typefor Paddle and PayPal. It is the same value the event log shows in its Type column.
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.
bodyis parsed JSON, form fields (urlencoded, or the text fields of a multipart form) or the raw text, andraw_bodyis the text as received.methodis always POST; the query string, the path and the caller's IP are not passed to your code.delivery_idis the event'sX-AnyHook-Deliveryid, andattemptcounts 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_idwhere the API allows it. - Pipedream steps.
export default defineComponent({ async run({ steps, $ }) {} })runs too:steps.trigger.eventis the event above,$.exportand$.flow.exitwork, everydata_storeprop is the app's store, an app prop's$auth.fieldreads the secretAPP_FIELD, and any other prop reads the secret named after it (channelIdreadsCHANNEL_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.NAMEorprocess.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 withANYHOOK_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,entriesandclearkeep 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.
scheduleis five cron fields, UTC unless prefixedCRON_TZ=Area/City. Each firing posts ananyhook.scheduleevent 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 anemail.receivedevent whose body hasfrom,to,subject,message_id,date,sizeand the MIME message asraw. 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 carriesAccess-Control-Allow-Origin: *. A plain HTML form needsmethod="post". Add?redirect=https://your-site.com/thanksto its action and a stored event sends the visitor there with a303, 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 inevent.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
429and is held (circuit_open), not retried, ready to replay once the month turns or the plan grows. - Testing, on and off.
POST .../code/testruns the saved code on the app's latest stored event, anevent_id, or abodyyou 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, whilePUT .../codesaves 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": falseand turn the code on after you remove that destination. Either change takes up to a minute to reach every edge location.
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.
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
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
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
Query parameters for listing:
| Param | Type | Description |
|---|---|---|
| app_slug | string | Filter by app slug |
| status | string | Filter by status (queued, success, retrying, failed, rejected, circuit_open, quota_exceeded) |
| limit | integer | Max results (default 50, max 200) |
Replay (API)
See API Replay above for full details and examples.
Undelivered (API)
See Undelivered Events above for full details and examples.
Batch Replay (API)
See Batch Replay above for full details and examples.
Plan Limits
| Free | Pro ($20/mo) | Scale ($90/mo) | Enterprise | |
|---|---|---|---|---|
| Events/month | 10,000 | 50,000 | 250,000 | Flexible |
| Daily cap | 1,000 | None | None | None |
| Apps | 1 | 10 | 50 | Flexible |
| Destinations per app | 3 | 20 | 50 | Flexible |
| Delivery attempts | 3 | 5 | 10 | Flexible |
| History | 3 days | 1 year | 7 years | Flexible |
| Replayable for | 3 days | 30 days | 90 days | Up to 365 days |
| Delivery timeout | 60s | 120s | 5 min | Flexible |
| Max payload | 512 KB | 2 MB | 4 MB | Custom |
| Overage | None | $0.15/1k | $0.17/1k | Contract |
| Daily replay limit | 100 | 500 | 1,000 | Unlimited |
| Code runs/month | None | 3,000 | 12,000 | Flexible |
| Code run time | None | 105s | 285s | Flexible |
| Compute allowance | $0.15 a month | $3.00 a month | $11.00 a month | Flexible |
| API and MCP calls | 300 a day | 1,000 a day | 3,000 a day | Flexible |
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: trueare 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-Afteruntil 00:00 UTC.GET /api/v1/usage(oranyhook_usageover 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_exceededand 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.
quota_exceeded and can be replayed after upgrading. Past that they are refused like the daily cap. Upgrade to Pro for metered overage.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
- Set a monthly spending cap in Settings ($5 / $10 / $20 / $50, or Off).
- Once your plan's event quota is reached, AnyHook checks whether overage is enabled and your cap isn't exhausted.
- If allowed, the event is delivered normally and tagged as overage.
- 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.
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
401on next use. - Keys are shown only once on creation. Store them securely.
Need help?
Email us at hello@anyhook.net: we respond to every message. Check status.anyhook.net for live service health.