Skip to main content
PATCH
/
api
/
chats
/
{id}
curl --request PATCH \
  --url https://api.yourdomain.com/api/chats/chat_123abc \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Updated Chat Name"
  }'
{
  "success": true,
  "message": "Chat updated successfully",
  "chat": {
    "id": "chat_123abc",
    "name": "Updated Chat Name",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-17T11:45:00Z"
  }
}

Path Parameters

id
string
required
Chat ID to update

Body Parameters

name
string
required
Updated chat name

Response

success
boolean
Indicates if the chat was updated successfully
message
string
Success or error message
chat
object
The updated chat object
curl --request PATCH \
  --url https://api.yourdomain.com/api/chats/chat_123abc \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Updated Chat Name"
  }'
{
  "success": true,
  "message": "Chat updated successfully",
  "chat": {
    "id": "chat_123abc",
    "name": "Updated Chat Name",
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-17T11:45:00Z"
  }
}