---
title: "Update Message"
method: PATCH
path: "/v0/inboxes/{inbox_id}/messages/{message_id}"
tags: ["inboxes > messages"]
---

# Update Message

`PATCH /v0/inboxes/{inbox_id}/messages/{message_id}`

## Request

- Base URL: `https://api.agentmail.to`
- URL: `https://api.agentmail.to/v0/inboxes/{inbox_id}/messages/{message_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/agentmail-to/apis/agentmail-to/docs/v0/inboxes/:inbox_id/messages/:message_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

**CLI:**
```bash
agentmail inboxes messages update --inbox-id <inbox_id> --message-id <message_id> --add-labels read --remove-labels unread
```

## Path parameters

- `inbox_id` string, required: The ID of the inbox.
- `message_id` string, required: ID of message.

## Request body

- MessagesUpdateMessageRequest
  - `add_labels` union: Label or list of labels.
    - string
    - string[]
  - `remove_labels` union: Label or list of labels.
    - string
    - string[]

## Response `200`

Response with status 200

- MessagesUpdateMessageResponse
  - `message_id` string, required: ID of message.
  - `labels` string[], required: Labels of message.

## Other responses

- `400`: Error response with status 400
- `404`: Error response with status 404

## Changes

- **2026-10-16** `3f5c7830c952`: 2 breaking, 5 info
  - the request property `add_labels` became not nullable
  - the request property `remove_labels` became not nullable
  - the endpoint scheme security `Bearer` was added to the API
  - the endpoint scheme security `BearerAuth` was removed from the API
  - …3 more
- **2026-07-15** `394ddcdd9c29`: 7 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `404` status
  - added the optional property `docs` to the response with the `400` status
  - added the optional property `docs` to the response with the `404` status
  - …3 more
- **2026-03-31** `5b7e1869efdc`: 2 info
  - request property `add_labels` list-of-types was widened by adding types `string` to media type `application/json`
  - request property `remove_labels` list-of-types was widened by adding types `string` to media type `application/json`
- **2026-03-31** `27965096e618`: 8 breaking, 13 warning
  - removed the required property `created_at` from the response with the `200` status
  - removed the required property `from` from the response with the `200` status
  - removed the required property `inbox_id` from the response with the `200` status
  - removed the required property `size` from the response with the `200` status
  - …17 more

[Operation history](https://skmtc.dev/agentmail-to/apis/agentmail-to/changes/v0/inboxes/:inbox_id/messages/:message_id/patch.md)

---

[API](https://skmtc.dev/agentmail-to/apis/agentmail-to.md) - [All operations](https://skmtc.dev/agentmail-to/apis/agentmail-to/llms.txt) - [OpenAPI document](https://skmtc.dev/agentmail-to/apis/agentmail-to/revisions/bb124483eb34?raw)
