---
title: "Set a failure rule"
method: PUT
path: "/sandbox/failure-injection"
tags: ["sandbox"]
---

# Set a failure rule

`PUT /sandbox/failure-injection`

## Request

- Base URL: `https://be.graph8.com/api/v1`
- URL: `https://be.graph8.com/api/v1/sandbox/failure-injection`
- Auth: HTTP bearer

SANDBOX ONLY. This endpoint exists only in the graph8 developer sandbox and returns 404 on the live platform. Call GET /sandbox/status to see which environment your key reaches.

Make the next simulated sends on a channel fail the way you choose (M3-5).

## Headers

- `Authorization` string, nullable
- `X-Target-Org-Id` string, nullable

## Request body

- FailureRuleRequest
  - `channel` string, required: Channel the injected failure applies to: email, sms, whatsapp, voice, linkedin, crm, ads, calendar, or '*' for every channel.
  - `failure_mode` string, required: One of: hard_bounce, provider_error, timeout, rate_limited, invalid_recipient.
  - `remaining` integer, nullable: Fail this many sends, then auto-clear. Omit to fail until cleared.

## Response `200`

Successful Response

- FailureRulesResponse
  - `sandbox` boolean
  - `rules` object[], required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/graph8/apis/graph8-developer-api.md) · [All operations](https://skmtc.dev/graph8/apis/graph8-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/graph8/apis/graph8-developer-api/revisions/2e7cfa0ca921?raw)
