---
title: "Delete Inboxes"
url: "https://docs.yoagent.dev/reference/rest-api/operations/deleteinboxes"
---

# Delete Inboxes

POST

/v0/inboxes/delete

```sh
curl -s -X POST "https://api.yoagent.dev/v0/inboxes/delete" \
  -H "Authorization: Bearer $YOAGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"inbox_ids":["inb_01je56wqswfmn9pgbc1wq8tjgq"]}'
```

```js
const response = await fetch("https://api.yoagent.dev/v0/inboxes/delete", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.YOAGENT_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "inbox_ids": [
      "inb_01je56wqswfmn9pgbc1wq8tjgq"
    ]
  }),
});
if (!response.ok) throw new Error(await response.text());
```

```python
import os

import requests

response = requests.post(
    "https://api.yoagent.dev/v0/inboxes/delete",
    headers={"Authorization": f"Bearer {os.environ['YOAGENT_KEY']}"},
    json={
        "inbox_ids": [
            "inb_01je56wqswfmn9pgbc1wq8tjgq",
        ],
    },
    timeout=60,
)
response.raise_for_status()
```

- api.yoagent.dev/v0/inboxes/delete

Delete inboxes with all their mail (up to 200): all of them or none — one the caller does not see is 404, one it may not delete (no `inbox_delete` on it, a catch-all) refuses them all.

## Authorizations

- **[ApiKey](https://docs.yoagent.dev/reference/rest-api#apikey)**

## Request Body required

application/json

_InboxesDelete_

Delete inboxes with all their mail: all of them or none.

object

**inbox_ids**

required

_Inbox Ids_

The inboxes to delete.

Array\<string>

\>= 1 items <= 200 items

## Responses

### 204

Successful Response

### default

An error (400, 401, 403, 404, 405, 409, 413, 429, 500, 503), in the one shape every call answers: [Errors](https://docs.yoagent.dev/reference/conventions#errors).
