curl --request PATCH \
--url http://localhost:8091/api/messages/{messageID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>"
}
'{
"data": {
"id": "<string>",
"channelId": "<string>",
"userId": "<string>",
"content": "<string>",
"edited": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"threadId": "<string>",
"user": {
"id": "<string>",
"username": "<string>",
"displayName": "<string>",
"status": "<string>",
"bot": true,
"createdAt": "2023-11-07T05:31:56Z",
"avatarPath": "<string>"
},
"replyCount": 123,
"reactions": [
{
"emoji": "<string>",
"count": 123,
"users": [
"<string>"
]
}
],
"attachments": [
{
"id": "<string>",
"messageId": "<string>",
"filename": "<string>",
"storedPath": "<string>",
"mimeType": "<string>",
"sizeBytes": 123,
"createdAt": "2023-11-07T05:31:56Z"
}
]
}
}Edits an existing message. Only the original author can edit their messages.
curl --request PATCH \
--url http://localhost:8091/api/messages/{messageID} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>"
}
'{
"data": {
"id": "<string>",
"channelId": "<string>",
"userId": "<string>",
"content": "<string>",
"edited": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"threadId": "<string>",
"user": {
"id": "<string>",
"username": "<string>",
"displayName": "<string>",
"status": "<string>",
"bot": true,
"createdAt": "2023-11-07T05:31:56Z",
"avatarPath": "<string>"
},
"replyCount": 123,
"reactions": [
{
"emoji": "<string>",
"count": 123,
"users": [
"<string>"
]
}
],
"attachments": [
{
"id": "<string>",
"messageId": "<string>",
"filename": "<string>",
"storedPath": "<string>",
"mimeType": "<string>",
"sizeBytes": 123,
"createdAt": "2023-11-07T05:31:56Z"
}
]
}
}Session token obtained from /api/auth/login or /api/auth/register. Pass as: Authorization: Bearer
Message ID
Updated message content
Message updated
Show child attributes