# test_mode_required: HTTP 403
URL: https://emailforagents.ai/docs/errors/test_mode_required
Summary: The endpoint only exists for test projects, and the project or inbox you aimed it at is a live one. What triggers it in the implementation, and how to resolve it.

## test_mode_required

HTTP 403 Don’t retry REST API

The endpoint only exists for test projects, and the project or inbox you aimed it at is a live one.

### How to fix it

1. Create a test project and a test inbox, then aim the simulation at those. A workspace can create up to 3 test inboxes.
2. Check the key prefix. An efa_test_ key resolves only to test projects and test inboxes, so if your key is efa_live_ you are pointed at the wrong environment entirely.
3. Do not look for a flag that relaxes this. Environment is carried in the key prefix and cannot be crossed, and a project's environment cannot be converted after creation.
4. To exercise a live inbox end to end, send real mail to its address on agents.emailforagents.ai instead of simulating.

### Which rule fired

Inbound simulation injects a message directly into a mailbox without it crossing a transport. Allowing that against a live inbox would mean live mail history could contain messages nobody sent, so the check runs twice: once on the project's environment and again on the specific inbox's environment, inside the same transaction that would write the message. The second check matters because a project and an inbox are separately recorded, and only the inbox row proves where the message would actually land.

| In error.message | Means |
| --- | --- |
| `Simulation endpoints only work on test projects.` | The project resolved from the path is not a test project. Checked before any inbox lookup. |
| `Inbox is not a test inbox.` | The inbox named in the body has environment live, even though the project passed the first check. |

**Why it works this way:** There is no promotion path from a test project to a live one. That is a deliberate constraint rather than a missing feature: it keeps the environment of every message decidable from the row it is stored in, which is what lets a single check at the inbox level be trustworthy.

### Example

POST /v1/projects/{project_id}/test/inbound → 403

```
{
  "error": {
    "code": "test_mode_required",
    "message": "Simulation endpoints only work on test projects.",
    "request_id": "req_8Kd2x91",
    "retryable": false,
    "details": {}
  }
}
```

#### Where it appears

- `POST /projects/{project_id}/test/inbound`

Paths are relative to `https://api.emailforagents.ai/v1`.

### Often confused with

[test_mode_unsupported](https://emailforagents.ai/docs/errors/test_mode_unsupported) [environment_immutable](https://emailforagents.ai/docs/errors/environment_immutable)
