> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devhelm.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Simulate a failing receiver

> Reply to the sender with an error status or a delay so you can exercise retries and timeouts

The mock reply is what the sender receives after the inbox stores the request. Status is 200–599. Delay is 0–30000 milliseconds. The default is HTTP 200, `text/plain`, an empty body, and no delay.

Use this to force a retry or a client timeout. The capture still happens. Only the reply changes.

## Change an existing inbox

```typescript theme={null}
import { Devhelm } from "@devhelm/sdk";

const client = new Devhelm({
  token: process.env.DEVHELM_API_TOKEN!,
});

await client.inboxes.update("<inbox-id>", {
  httpResponse: {
    status: 500,
    contentType: "text/plain",
    body: "unavailable",
    delayMs: 5000,
  },
});
```

Omitted `httpResponse` fields stay as they are. Set `delayMs` to `0` and `status` to `200` to return to a fast success.

The same patch over HTTP:

```bash API theme={null}
curl -X PATCH "https://api.devhelm.io/api/v1/webhook/inboxes/<inbox-id>" \
  -H "Authorization: Bearer $DEVHELM_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"httpResponse":{"status":500,"contentType":"text/plain","body":"unavailable","delayMs":5000}}'
```

## Set the reply at create time

```bash theme={null}
export DEVHELM_API_TOKEN=dh_live_xxxxxxxx
devhelm inboxes create \
  --name failing-receiver \
  --response-status 500 \
  --response-body unavailable \
  --response-content-type text/plain \
  --response-delay-ms 5000 \
  -o json
```

`devhelm inboxes update` changes name, status, CORS, retention, and max events. It does not change the mock reply. Use the SDK or the PATCH above for an inbox that already exists.

## Next steps

<CardGroup cols={2}>
  <Card title="Assert in a test" icon="code" href="/testing/webhooks/assert-in-tests">
    Wait for the request your retry logic sends.
  </Card>

  <Card title="How capture works" icon="server" href="/testing/webhooks/overview">
    What is stored, and when a sender is dropped.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.