Skip to content
V2 (Legacy) API ReferenceGet started

Update a chat

chats.update(strchat_id, ChatUpdateParams**kwargs) -> ChatUpdateResponse
PUT/v3/chats/{chatId}

Update chat properties such as display name and group chat icon.

Listen for chat.group_name_updated, chat.group_icon_updated, chat.group_name_update_failed, or chat.group_icon_update_failed webhook events to confirm the outcome.

ParametersExpand Collapse
chat_id: str
formatuuid
display_name: Optional[str]

New display name for the chat (group chats only)

group_chat_icon: Optional[str]

URL of an image to set as the group chat icon (group chats only)

formaturi
ReturnsExpand Collapse
class ChatUpdateResponse:
chat_id: Optional[str]
formatuuid
status: Optional[str]

Update a chat

import os
from linq import LinqAPIV3

client = LinqAPIV3(
    api_key=os.environ.get("LINQ_API_V3_API_KEY"),  # This is the default and can be omitted
)
chat = client.chats.update(
    chat_id="550e8400-e29b-41d4-a716-446655440000",
    display_name="Team Discussion",
)
print(chat.chat_id)
{
  "chat_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending"
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}
Returns Examples
{
  "chat_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "pending"
}
{
  "error": {
    "status": 400,
    "code": 1002,
    "message": "Phone number must be in E.164 format"
  },
  "success": false
}
{
  "error": {
    "status": 401,
    "code": 2004,
    "message": "Unauthorized - missing or invalid authentication token"
  },
  "success": false
}
{
  "error": {
    "status": 404,
    "code": 2001,
    "message": "Resource not found"
  },
  "success": false
}
{
  "error": {
    "status": 500,
    "code": 3006,
    "message": "Internal server error"
  },
  "success": false
}