# Delete the Organization's sandbox data

`POST https://api.koil.co/v1/sandbox/reset`

Delete the Organization's sandbox data: every Connection and Profile, announced as `connection.deleted` and `profile.deleted`, and every publish request, backfill request, media item, Connect Session and idempotency record, and the emulated platform accounts with their content. Apps and Event Destinations are kept. Not atomic with requests that run beside it, so reset between test runs. Safe to repeat. Sandbox keys only: a live key is refused with `not_supported`.

## Authorization

An API key from the Koil admin console, sent as `Authorization: Bearer <key>`. A live key starts `koil_live_` and a sandbox key `koil_sandbox_`; the key alone selects the Organization and mode. See https://docs.koil.co/concepts/authentication.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `Koil-Version` | header | yes | `"2026-12-08"` | The dated API version the request is written against; it fixes the request and response shapes. Every response echoes the version it is rendered in. |

## Example

```bash
curl -X POST "https://api.koil.co/v1/sandbox/reset" \
  -H "Authorization: Bearer $KOIL_API_KEY" \
  -H "Koil-Version: 2026-12-08"
```

## Response 200

Nothing: the sandbox is empty.

Type: object

## Errors

Every error has the same shape: `{ "error": { "code", "message", "meta", "requestId" } }`. [Errors →](https://docs.koil.co/concepts/errors)

| Status | Meaning |
| --- | --- |
| 400 | `validation_error`: The request does not match the operation's input schema, fails an admission check, or the platform refused its content. `meta.violations` names every problem. `not_supported`: The platform, collection or resource does not offer this operation, such as exporting a `key` Connection's credential, which Koil never returns. |
| 401 | `unauthorized`: No API key, or a key Koil does not accept (unknown, revoked, or with a prefix that does not match its mode). |
| 429 | `rate_limit_exceeded`: Koil's own rate limit for the key, Organization, Profile, or client address is spent (`meta.budgets` names which); retry after `Retry-After` seconds. `platform_rate_limit`: The platform throttled the call or the platform quota is spent; retry after `Retry-After` seconds. |
| 500 | `internal`: Koil or the platform failed, and the status says which: 500 when Koil failed, including a platform refusing how Koil made the call; 502 when the platform failed or answered something Koil cannot use; 504 when Koil's call to the platform timed out. The message is generic; retry with backoff. |
| 503 | `service_unavailable`: A service Koil needs to accept the request (API key validation or rate limiting) is unavailable. Nothing was attempted; retry after `Retry-After` seconds. The hosting edge can deliver this as a `504` with neither this body nor `Retry-After`, so treat a `502`, `503` or `504` alike as retryable, with backoff. |
| default | Any other failure. `error.code` names it; the HTTP status follows from it. |
