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

# archive_emails

> Remove one or more messages from the Inbox and file them in the Archive mailbox.

Archives up to 50 messages in one call: each is removed from the Inbox and added to the Archive mailbox. Read state is untouched, and any other folder a message is in — Sent, for your own reply in a thread — is left alone. Re-running it on the same ids is harmless. To file into a specific folder use [`move_emails`](/reference/mcp/move-emails); to delete use [`trash_emails`](/reference/mcp/trash-emails).

Nothing is created: an account without an Archive mailbox gets an error, not a new folder.

## Parameters

<ParamField body="ids" type="string[]" required>
  1–50 message ids, as returned by [`search_emails`](/reference/mcp/search-emails) or [`get_thread`](/reference/mcp/get-thread). Duplicates are collapsed. To archive a whole conversation, pass every id `get_thread` lists.
</ParamField>

## Example

```json Call theme={null}
{ "ids": ["Mf2f0", "Mf2f4", "Mf31a"] }
```

```text Result theme={null}
Archived 3 message(s).
```

A batch is not all-or-nothing. Ids the server refused are listed with the reason, and the call only counts as an error when nothing was archived:

```text Result — one stale id theme={null}
Archived 2 message(s). Not updated (1): Mf31a (notFound).
```

## Errors

* `This account has no Archive mailbox. Nothing was archived. …` — create one in the mail client, or use `move_emails` with an existing folder.
* `Archived 0 message(s). Not updated (N): … Re-run search_emails or get_thread for current ids.` — every id was refused, typically because the messages no longer exist.
