Source: https://solidhooks.com/guides/webhook-response-status-codes

# 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

| Situation                     | Return                       | Why                                            |
| ----------------------------- | ---------------------------- | ---------------------------------------------- |
| Event queued                  | 200 or 204                   | Any 2xx is success                             |
| Duplicate you already handled | 200                          | Stops retries without repeating work           |
| Bad or missing signature      | 401 with a generic body      | Don't tell the caller which check failed       |
| Malformed payload             | 400                          | Expect the sender to retry anyway              |
| Overloaded                    | 429 with Retry-After         | Standard Webhooks senders throttle on it       |
| Queue or database down        | 503 or another 5xx           | The sender tries again later                   |
| Endpoint retired              | 410                          | Standard Webhooks senders disable the endpoint |
| URL has moved                 | Update the URL at the sender | Senders count a redirect as a failure          |

## 200 or 204?

Either. The [Standard Webhooks spec](https://github.com/standard-webhooks/standard-webhooks/blob/main/spec/standard-webhooks.md) treats any `2xx` as success, and the [AI SDK's MCP events helper](https://ai-sdk.dev/cookbook/node/mcp-events) returns 204. Timing matters more than the number. The [OWASP webhook cheat sheet](https://cheatsheetseries.owasp.org/cheatsheets/Webhook_Security_Cheat_Sheet.html) 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 `410` s 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](https://github.com/svix/svix-webhooks/releases/tag/server-v1.105.0) 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](https://solidhooks.com/guides/webhook-retry-timeout-limits).

## Where SolidHooks fits

When SolidHooks delivers to your services, it reads your status codes as set out in [retries](https://solidhooks.com/docs/retries). Retries are free and reuse the same delivery.

To recover events after an outage, see [Replay Webhooks After Outage Safely](https://solidhooks.com/guides/replay-webhooks-after-outage).

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

### Should a webhook endpoint return 200 or 204?

Either. Senders that follow Standard Webhooks treat any 2xx as success. Return it only after the event is stored or queued, and well inside the sender's timeout.

### Does returning a 4xx stop webhook retries?

Not reliably. Many senders retry any non-2xx. SolidHooks retries every 4xx except 410 and 429, so make your processing safe to repeat.

### Does SolidHooks honour Retry-After on a 503?

No. SolidHooks honours Retry-After on 429, 502 and 504, capped at one hour. A 503 is retried on the normal schedule.

## 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.
