What HTTP status code should a webhook endpoint return?

Return a 2xx as soon as the event is safely queued. 200 and 204 both work. Send 401 for a bad signature, 429 with Retry-After when you're overloaded, and 410 only when you want the sender to stop for good. Never redirect. Senders read these codes to decide whether to retry, and they don't all read them the same way.

Checked 16 Nov 2026.

The short version

SituationReturnWhy
Event queued200 or 204Any 2xx is success
Duplicate you already handled200Stops retries without repeating work
Bad or missing signature401 with a generic bodyDon't tell the caller which check failed
Malformed payload400Expect the sender to retry anyway
Overloaded429 with Retry-AfterStandard Webhooks senders throttle on it
Queue or database down503 or another 5xxThe sender tries again later
Endpoint retired410Standard Webhooks senders disable the endpoint
URL has movedUpdate the URL at the senderSenders count a redirect as a failure

200 or 204?

Either. The Standard Webhooks spec treats any 2xx as success, and the AI SDK's MCP events helper returns 204. Timing matters more than the number. The OWASP webhook cheat sheet says to return it only after the event is durably queued or processed, and Stripe says to return it before any slow logic that could time out.

A 4xx doesn't always stop retries

The Standard Webhooks spec treats almost every non-2xx as a failure. SolidHooks retries every 4xx except 410 and 429: two 410s in a row disable the destination, and a 429 parks the delivery. Use 4xx codes honestly, but expect retries and make your handler safe to run twice.

Overloaded? 429, 503 and Retry-After

The spec says senders should throttle on 429, 502 and 504, and take a retry-after header into account, for example on a 503. Senders cap the header, though. Svix Server now clamps it to seven days, because a very long value could crash a worker.

SolidHooks parks a delivery on 429, 502 or 504. It honours Retry-After up to one hour, the pause doesn't use a retry attempt, and a delivery can be parked at most five times. A 503 isn't parked. SolidHooks treats it like any other failure and retries on its normal schedule. If you want SolidHooks to back off without using up attempts, return 429.

javascript
// Pick the response for one webhook request.
export async function respond(req, { verify, overloaded, seen, enqueue }) {
  if (!verify(req.rawBody, req.headers)) return { status: 401 };
  if (overloaded()) return { status: 429, headers: { 'retry-after': '30' } };
  let event;
  try {
    event = JSON.parse(req.rawBody);
  } catch {
    return { status: 400 };
  }
  if (await seen(event.id)) return { status: 200 };
  try {
    await enqueue(event);
  } catch {
    return { status: 503 }; // SolidHooks retries this on its normal schedule
  }
  return { status: 204 };
}

Redirects and timeouts

Don't redirect a webhook. Stripe and SolidHooks both count a 3xx as a failure, and SolidHooks never follows one. Change the URL at the sender instead.

Answer quickly. GitHub expects a 2xx within 10 seconds, and Vercel allows 30. SolidHooks waits 20 seconds by default, and you can set anything from 1 to 30. For more providers, see webhook retry and timeout limits.

Where SolidHooks fits

When SolidHooks delivers to your services, it reads your status codes as set out in retries. Retries are free and reuse the same delivery.

To recover events after an outage, see Replay Webhooks After Outage Safely.

When SolidHooks receives from a provider, it replies once the event is verified and stored, with {"ok":true,"eventId":"evt_..."}. A duplicate gets {"ok":true,"duplicate":true}, a failed signature gets an opaque 401, and a tripped rate limit gets 429 with Retry-After. A slow service behind SolidHooks doesn't hold up that reply.

FAQ

Get started

The Hobby plan is free for 10,000 deliveries a month, with 3 attempts over an hour. Paid plans get up to 8 attempts over 36 hours. Point a destination at your service and SolidHooks reads its status codes as above.