# Move an email to trash

Source: https://docs.maylee.app/api-reference/emails/trash-email

`DELETE https://api.maylee.app/api/v1/emails/{emailId}`

Scope: `write`.

Never a permanent delete: the message stays recoverable from trash.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `emailId` | path | string | yes |  |

## Example request

```bash
curl -X DELETE "https://api.maylee.app/api/v1/emails/<emailId>" \
  -H "Authorization: Bearer $MAYLEE_KEY"
```

## Responses

### 204

Moved to trash, or already there: replaying a deletion is not an error.

### 400

`NO_TRASH_FOLDER`: the mailbox has no trash folder, so the move cannot be applied.

### 401

Missing, malformed, revoked or expired API key.

### 403

Key lacks the required scope, or outbound sending is not enabled on it.

### 404

Not found, or belongs to another workspace.

### 429

Per-minute rate limit (`RATE_LIMIT_EXCEEDED`) or monthly quota (`QUOTA_EXCEEDED`) exhausted.

Errors use the format `{ "code", "error", "details" }`: see [Errors](/errors.md).
