# Delete an auto-forward rule

Source: https://docs.maylee.app/api-reference/auto-forward-rules/delete-auto-forward-rule

`DELETE https://api.maylee.app/api/v1/auto-forward-rules/{ruleId}`

Scope: `write`. Also requires `allowOutboundSend` (the Send emails permission of the key).

Requires `allowOutboundSend` on the key.

## Parameters

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

## Example request

```bash
curl -X DELETE "https://api.maylee.app/api/v1/auto-forward-rules/<ruleId>" \
  -H "Authorization: Bearer $MAYLEE_KEY"
```

## Responses

### 204

Deleted.

### 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).
