> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wiseguard.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete & restore

> wiseguard_delete_alias and wiseguard_restore_alias: delete an alias, and bring it back within 7 days.

Both tools find the alias the same way. Pass exactly one of `alias_id` or `address`. Unlike the other tools, they also find deleted aliases.

Each call costs [credits](/guides/credits#what-each-tool-costs). If you don't have enough, the tool changes nothing. See [When you run out](/guides/credits#when-you-run-out).

## wiseguard\_delete\_alias

Deletes an alias. You can restore it for 7 days. After that, the address is retired forever.

<Warning>
  Paused and deleted aliases still receive and forward mail today. Pausing or deleting an alias doesn't block mail yet. A deleted alias keeps forwarding until it's removed for good, after the 7-day restore window.
</Warning>

<Badge color="red" shape="pill">Destructive</Badge> **Scope:** `aliases:write`

### Input

| Name | Type | Required | Description |
| - | - | - | - |
| `alias_id` | string | One of | The alias ID (a UUID). |
| `address` | string | One of | The full alias address. |

### Output

| Field | Type | Description |
| - | - | - |
| `id` | string | The alias ID. |
| `address` | string | The full alias address. |
| `label` | string | What the alias was for. |
| `site_domain` | string or null | The website the alias was for. |
| `deleted_at` | string | When it was deleted (ISO 8601). |
| `restorable_until` | string | The restore deadline (ISO 8601). After this, the address is retired forever. |

### Errors

```text wrap theme={null}
No alias with that ID or address on this account.
```

```text wrap theme={null}
The alias changed at the same moment. Get it again and retry.
```

```text wrap theme={null}
The alias was just deleted, so it can no longer be changed.
```

The alias is already deleted, and can still be restored until the time shown:

```text wrap theme={null}
This alias is already deleted; it can be restored until 2026-10-21T09:30:00.000Z.
```

The alias is already deleted, and the restore window has passed:

```text wrap theme={null}
This alias is already deleted and can no longer be restored.
```

### Example prompt

```text wrap theme={null}
Delete my old shopping alias.
```

## wiseguard\_restore\_alias

Restores a deleted alias within 7 days of deleting it. It comes back active, with the same address.

<Badge color="blue" shape="pill">Changes data</Badge> **Scope:** `aliases:write`

### Input

| Name | Type | Required | Description |
| - | - | - | - |
| `alias_id` | string | One of | The alias ID (a UUID). |
| `address` | string | One of | The full alias address. |

### Output

The [alias object](/tools/read#the-alias-object), with `state: active`.

### Errors

```text wrap theme={null}
No alias with that ID or address on this account.
```

```text wrap theme={null}
The alias changed at the same moment. Get it again and retry.
```

The 7-day window has passed:

```text wrap theme={null}
The 7-day restore window has passed; this address is retired forever.
```

The alias isn't deleted:

```text wrap theme={null}
This alias is not deleted; nothing to restore.
```

### Example prompt

```text wrap theme={null}
Restore the alias I just deleted.
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.