curl --request PUT \
--url https://{appid}.api-{region}.cometchat.io/v3/messages/{id} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"data": {
"text": "<string>",
"metadata": {}
},
"tags": [
"tag1"
]
}
'{
"data": {
"id": "402",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "action",
"type": "message",
"data": {
"action": "edited",
"entities": {
"by": {
"entity": {
"uid": "superhero1",
"name": "Updated Name",
"status": "offline",
"role": "default",
"createdAt": 1639448370,
"updatedAt": 1640599553
},
"entityType": "user"
},
"for": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png",
"status": "offline",
"role": "default",
"createdAt": 1639448370
},
"entityType": "user"
},
"on": {
"entity": {
"id": "69",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "message",
"type": "text",
"data": {
"text": "hello spider",
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"role": "default",
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
"status": "offline",
"createdAt": 1639448370
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"role": "default",
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png",
"status": "offline",
"createdAt": 1639448370,
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
}
}
},
"sentAt": 1640171302,
"editedAt": 1641477338,
"editedBy": "app_system",
"updatedAt": 1641477338,
"tags": [
"t6"
]
},
"entityType": "message"
}
}
},
"sentAt": 1641477338,
"updatedAt": 1641477338
}
}Edits the message on behalf of a user.
curl --request PUT \
--url https://{appid}.api-{region}.cometchat.io/v3/messages/{id} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"data": {
"text": "<string>",
"metadata": {}
},
"tags": [
"tag1"
]
}
'{
"data": {
"id": "402",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "action",
"type": "message",
"data": {
"action": "edited",
"entities": {
"by": {
"entity": {
"uid": "superhero1",
"name": "Updated Name",
"status": "offline",
"role": "default",
"createdAt": 1639448370,
"updatedAt": 1640599553
},
"entityType": "user"
},
"for": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png",
"status": "offline",
"role": "default",
"createdAt": 1639448370
},
"entityType": "user"
},
"on": {
"entity": {
"id": "69",
"conversationId": "superhero1_user_superhero2",
"sender": "superhero1",
"receiverType": "user",
"receiver": "superhero2",
"category": "message",
"type": "text",
"data": {
"text": "hello spider",
"entities": {
"sender": {
"entity": {
"uid": "superhero1",
"name": "Iron Man",
"role": "default",
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/ironman.png",
"status": "offline",
"createdAt": 1639448370
},
"entityType": "user"
},
"receiver": {
"entity": {
"uid": "superhero2",
"name": "Captain America",
"role": "default",
"avatar": "https://data-eu.cometchat.io/assets/images/avatars/captainamerica.png",
"status": "offline",
"createdAt": 1639448370,
"conversationId": "superhero1_user_superhero2"
},
"entityType": "user"
}
}
},
"sentAt": 1640171302,
"editedAt": 1641477338,
"editedBy": "app_system",
"updatedAt": 1641477338,
"tags": [
"t6"
]
},
"entityType": "message"
}
}
},
"sentAt": 1641477338,
"updatedAt": 1641477338
}
}API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).
UID of the user on whose behalf the action is performed.
Id of the message whose details are to be fetched.
Updated Message