Skip to main content
PUT
/
api
/
v1
/
chats
/
{chatId}
Update chat
curl --request PUT \
  --url http://localhost:{port}/api/v1/chats/{chatId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "mute": true,
  "muteDuration": 123,
  "pin": true,
  "archive": true,
  "markAsRead": true,
  "markAsUnread": true,
  "clearMessages": true
}
'
{
  "success": true,
  "chatId": "<string>",
  "actions": {
    "muted": true,
    "pinned": true,
    "archived": true,
    "read": true,
    "cleared": true
  }
}

Authorizations

Authorization
string
header
required

JWT token authentication

Path Parameters

chatId
string
required

ID of the chat to update

Body

application/json
mute
boolean

Whether to mute (true) or unmute (false) the chat

muteDuration
integer

Duration to mute the chat in seconds

pin
boolean

Whether to pin (true) or unpin (false) the chat

archive
boolean

Whether to archive (true) or unarchive (false) the chat

markAsRead
boolean

Whether to mark the chat as read

markAsUnread
boolean

Whether to mark the chat as unread

clearMessages
boolean

Whether to clear all messages from the chat

Response

Chat updated successfully

success
boolean
required

Whether the action was successful

chatId
string
required

ID of the chat the action was performed on

actions
object

Actions performed