---
title: "Archive messages (iCloud Mail)"
method: POST
path: "/v1/icloud_mail/archive"
tags: ["write"]
---

# Archive messages (iCloud Mail)

`POST /v1/icloud_mail/archive`

## Request

- Base URL: `https://muse.space`
- URL: `https://muse.space/v1/icloud_mail/archive`
- Auth: HTTP bearer

Move up to 50 messages out of their folder into the Archive of this mailbox, or into All Mail on Gmail; nothing is erased.

## Request body

- MailArchiveInput
  - `ids` string[], required: Message `id`s to archive.

## Response `200`

The result.

- MailArchiveOutput
  - `moved` integer, required
  - `folder` string, required
  - `ids` object[]
    - `id` string, required
    - `new_id` string, required
  - `already_there` string[]
  - `not_found` string[]

## Other responses

- `401`: `unauthorized`, `token_revoked`, `token_expired`
- `403`: `forbidden`, `recipient_not_allowed`
- `404`: `not_found`
- `409`: `reconnect_required`, `changed_since_read`
- `413`: `too_large`
- `422`: `invalid_arguments`, `unreadable`
- `429`: `rate_limited`, `send_cap_reached`, `send_cooldown`
- `500`: `internal`
- `502`: `upstream_unavailable`, `upstream_rejected`, `delivery_unconfirmed`

---

[API](https://skmtc.dev/muse/apis/muse-space-tool-catalogue.md) · [All operations](https://skmtc.dev/muse/apis/muse-space-tool-catalogue/llms.txt) · [OpenAPI document](https://skmtc.dev/muse/apis/muse-space-tool-catalogue/revisions/8bef59003b3c?raw)
