---
title: "trash and untrash a message"
method: PATCH
path: "/api/v1/mails/{mailServerID}/messages/{messageID}/"
tags: ["messages"]
---

# trash and untrash a message

`PATCH /api/v1/mails/{mailServerID}/messages/{messageID}/`

## Path parameters

- `mailServerID` string, required
- `messageID` string, required

## Request body

- Model19
  - `isTrash` boolean, required

## Response `200`

OK

## Other responses

- `400` — Bad Request
- `404` — Mail Server or Mail Message not found
- `500` — Unexpected error

## Changes

- **2025-07-29** `f1f122bb148b` — 2 breaking
  - added the new required request property `isTrash`
  - the request's body type changed from no type to `object`
- **2024-10-17** `899b7592e4f6` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion/changes/api/v1/mails/:mailServerID/messages/:messageID/patch.md)

---

[API](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion.md) · [All operations](https://skmtc.dev/liara-cloud/apis/liara-mail-api-documentaion/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/liara-cloud/liara-mail-api-documentaion/revisions/5ae39ee353b2/schema)
