Chats

Edit chat message

patch/api/v2/chats/{chat}/messages/{message}

Path parameters

chatstring uuid required

Chat ID

messageinteger required

Message ID

Request body

mcp_server_idsstring[]

MCPServerIDs, when set, replaces the chat's MCP server selection before the replacement turn runs. When nil the current selection is preserved.

model_config_idstring uuid

ModelConfigID, when set, overrides the model used for the replacement user message and the assistant turn that follows. When nil the original message's model is preserved.

reasoning_effortstring

Response

OK

deleted_message_idsinteger[]

DeletedMessageIDs holds the IDs of previously visible messages the edit removed, including stale hook notices from the edited turn. Clients should drop them from local caches.

warningsstring[]

Changes