> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-beta.getzep.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs-beta.getzep.com/_mcp/server.

# Updates a message.

PATCH https://api.getzep.com/api/v2/messages/{messageUUID}
Content-Type: application/json

Updates a message.

Reference: https://docs-beta.getzep.com/sdk-reference/thread/message/updates-a-message

## Request

### Path parameters

- `messageUUID` (string, required) — The UUID of the message.

### Body (application/json)

This endpoint expects a models.ThreadMessageUpdate.

- `metadata` (map from string to any, required) — Metadata to store on the message. Max 10 keys. Values must be strings, numbers, booleans, or arrays of scalars.

## Response

### 200

The updated message.

- `content` (string, required) — The content of the message.
- `role` (enum, required) — The role of message sender (e.g., "user", "system").
  - Allowed values: `norole`, `system`, `assistant`, `user`, `function`, `tool`
- `created_at` (string, optional) — The timestamp of when the message was created.
- `metadata` (map from string to any, optional) — The metadata associated with the message. Max 10 keys. Values must be strings, numbers, booleans, or arrays of scalars.
- `name` (string, optional) — Customizable name of the sender of the message (e.g., "john", "sales_agent").
- `processed` (boolean, optional) — Whether the message has been processed.
- `uuid` (string, optional) — The unique identifier of the message.

## Errors

### 404 Not Found Error

Not Found

- `message` (string, optional)

### 500 Internal Server Error

Internal Server Error

- `message` (string, optional)

## Examples

**Request**

```json
{
  "metadata": {}
}
```

**Response**

```json
{
  "content": "string",
  "role": "norole",
  "created_at": "string",
  "metadata": {},
  "name": "string",
  "processed": true,
  "uuid": "string"
}
```