curl --request PUT \
--url https://{appId}.api-{region}.cometchat.io/v3/users/{uid}/conversation \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--header 'onBehalfOf: <onbehalfof>' \
--data '
{
"tags": [
"<string>"
]
}
'{
"data": [
{
"conversationId": "group_project-group",
"conversationType": "group",
"unreadMessageCount": "0",
"createdAt": 1630071782,
"updatedAt": 1630481413,
"lastMessage": {
"id": "50",
"conversationId": "group_project-group",
"sender": "cometchat-uid-4",
"receiverType": "group",
"receiver": "project-group",
"category": "action",
"type": "groupMember",
"data": {
"action": "unbanned",
"entities": {
"by": {
"entity": {
"uid": "cometchat-uid-4",
"name": "Susan Marie",
"role": "default",
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-4.webp",
"status": "offline",
"createdAt": 1629869270
},
"entityType": "user"
},
"on": {
"entity": {
"uid": "cometchat-uid-3",
"link": "https://data-us.cometchat.io/assets",
"name": "George Alan",
"role": "default",
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp",
"status": "offline",
"createdAt": 1629869270,
"updatedAt": 1629964825,
"conversationId": "cometchat-uid-3_user_cometchat-uid-4"
},
"entityType": "user"
},
"for": {
"entity": {
"guid": "project-group",
"icon": "https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp",
"name": "Project Group1",
"type": "private",
"owner": "cometchat-uid-4",
"createdAt": 1630071341,
"updatedAt": 1630305525,
"updatedBy": "cometchat-uid-4",
"description": "project related discussions between members",
"membersCount": 4,
"conversationId": "group_project-group"
},
"entityType": "group"
}
}
},
"sentAt": 1630305562,
"updatedAt": 1630305562,
"receipts": {
"data": [
[]
]
}
},
"conversationWith": {
"guid": "project-group",
"name": "Project Group1",
"description": "project related discussions between members",
"icon": "https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp",
"type": "private",
"scope": "participant",
"membersCount": 4,
"joinedAt": 1630071782,
"conversationId": "group_project-group",
"hasJoined": true,
"createdAt": 1630071341,
"owner": "cometchat-uid-4",
"updatedAt": 1630308875,
"updatedBy": "cometchat-uid-4"
}
}
]
}Updating User Conversation
curl --request PUT \
--url https://{appId}.api-{region}.cometchat.io/v3/users/{uid}/conversation \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--header 'onBehalfOf: <onbehalfof>' \
--data '
{
"tags": [
"<string>"
]
}
'{
"data": [
{
"conversationId": "group_project-group",
"conversationType": "group",
"unreadMessageCount": "0",
"createdAt": 1630071782,
"updatedAt": 1630481413,
"lastMessage": {
"id": "50",
"conversationId": "group_project-group",
"sender": "cometchat-uid-4",
"receiverType": "group",
"receiver": "project-group",
"category": "action",
"type": "groupMember",
"data": {
"action": "unbanned",
"entities": {
"by": {
"entity": {
"uid": "cometchat-uid-4",
"name": "Susan Marie",
"role": "default",
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-4.webp",
"status": "offline",
"createdAt": 1629869270
},
"entityType": "user"
},
"on": {
"entity": {
"uid": "cometchat-uid-3",
"link": "https://data-us.cometchat.io/assets",
"name": "George Alan",
"role": "default",
"avatar": "https://assets.cometchat.io/sampleapp/v2/users/cometchat-uid-2.webp",
"status": "offline",
"createdAt": 1629869270,
"updatedAt": 1629964825,
"conversationId": "cometchat-uid-3_user_cometchat-uid-4"
},
"entityType": "user"
},
"for": {
"entity": {
"guid": "project-group",
"icon": "https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp",
"name": "Project Group1",
"type": "private",
"owner": "cometchat-uid-4",
"createdAt": 1630071341,
"updatedAt": 1630305525,
"updatedBy": "cometchat-uid-4",
"description": "project related discussions between members",
"membersCount": 4,
"conversationId": "group_project-group"
},
"entityType": "group"
}
}
},
"sentAt": 1630305562,
"updatedAt": 1630305562,
"receipts": {
"data": [
[]
]
}
},
"conversationWith": {
"guid": "project-group",
"name": "Project Group1",
"description": "project related discussions between members",
"icon": "https://assets.cometchat.io/sampleapp/v2/groups/cometchat-guid-1.webp",
"type": "private",
"scope": "participant",
"membersCount": 4,
"joinedAt": 1630071782,
"conversationId": "group_project-group",
"hasJoined": true,
"createdAt": 1630071341,
"owner": "cometchat-uid-4",
"updatedAt": 1630308875,
"updatedBy": "cometchat-uid-4"
}
}
]
}For the complete error reference, see Error Guide.Documentation Index
Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
UID of the user on whose behalf the action is performed.
UID of the user whose conversation is being accessed.
List of tags to identify specific conversation.
Updated user Conversations
Was this page helpful?