Skip to main content
PUT
/
api
/
v1
/
chats
/
{id}
Update chat
curl --request PUT \
  --url http://localhost:3001/api/v1/chats/{id} \
  --header 'Content-Type: application/json' \
  --cookie nut-session= \
  --data '
{
  "title": "<string>",
  "messages": [
    {
      "role": "user",
      "content": "<string>",
      "name": "<string>",
      "toolCalls": [
        {}
      ],
      "toolCallId": "<string>"
    }
  ],
  "model": "<string>",
  "context": {
    "type": "<string>",
    "content": "<string>",
    "displayId": "<string>",
    "contextFiles": "<string>"
  }
}
'
{
  "success": true,
  "chatId": "<string>",
  "message": "Chat updated successfully"
}

Authorizations

nut-session
string
cookie
required

Session cookie authentication

Path Parameters

id
string
required

Chat ID

Body

application/json
title
string

Updated chat title

messages
object[]

Updated messages array

model
string

Model identifier

context
object

Context information

Response

Chat updated successfully

success
boolean
Example:

true

chatId
string

The ID of the updated chat

message
string
Example:

"Chat updated successfully"