diff --git a/_data/toc.yml b/_data/toc.yml index dfa45c1b4e..4eb9478f21 100644 --- a/_data/toc.yml +++ b/_data/toc.yml @@ -247,6 +247,7 @@ - pinMessage - postMessage - react + - reportMessage - search - starMessage - sendMessage diff --git a/contributing/documentation/documentation-map/README.md b/contributing/documentation/documentation-map/README.md index acd1d4e475..15ce1b0679 100644 --- a/contributing/documentation/documentation-map/README.md +++ b/contributing/documentation/documentation-map/README.md @@ -288,6 +288,7 @@ Here you can also find what articles are incomplete and missing. - pinMessage - postMessage - react + - reportMessage - search - starMessage - sendMessage diff --git a/developer-guides/rest-api/README.md b/developer-guides/rest-api/README.md index 1c4a793812..fae1ae0bbd 100644 --- a/developer-guides/rest-api/README.md +++ b/developer-guides/rest-api/README.md @@ -118,6 +118,7 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and | `/api/v1/chat.pinMessage` | Pins a chat message to the message's channel. | [Link](chat/pinmessage/) | | `/api/v1/chat.postMessage` | Posts a new chat message. | [Link](chat/postmessage/) | | `/api/v1/chat.react` | Sets/unsets the user's reaction to an existing chat message. | [Link](chat/react/) | +| `/api/v1/chat.reportMessage` | Reports a message. | [Link](chat/reportmessage/) | | `/api/v1/chat.search` | Search for messages in a channel. | [Link](chat/search/) | | `/api/v1/chat.starMessage` | Stars a chat message for the authenticated user. | [Link](chat/starmessage/) | | `/api/v1/chat.sendMessage` | Send new chat message. | [Link](chat/sendmessage/) | diff --git a/developer-guides/rest-api/chat/README.md b/developer-guides/rest-api/chat/README.md index d15465aece..65c4e168ba 100644 --- a/developer-guides/rest-api/chat/README.md +++ b/developer-guides/rest-api/chat/README.md @@ -7,6 +7,7 @@ | `/api/v1/chat.pinMessage` | Pins a chat message to the message's channel. | [Link](pinmessage/) | | `/api/v1/chat.postMessage` | Posts a new chat message. | [Link](postmessage/) | | `/api/v1/chat.react` | Sets/unsets the user's reaction to an existing chat message. | [Link](react/) | +| `/api/v1/chat.reportMessage` | Reports a message. | [Link](reportmessage/) | | `/api/v1/chat.search` | Search for messages in a channel. | [Link](search/) | | `/api/v1/chat.starMessage` | Stars a chat message for the authenticated user. | [Link](starmessage/) | | `/api/v1/chat.sendMessage` | Send new chat message. | [Link](sendmessage/) | diff --git a/developer-guides/rest-api/chat/reportmessage/README.md b/developer-guides/rest-api/chat/reportmessage/README.md new file mode 100644 index 0000000000..9d6b48bf26 --- /dev/null +++ b/developer-guides/rest-api/chat/reportmessage/README.md @@ -0,0 +1,38 @@ +# Chat Report Message + +Reports a message. + +| URL | Requires Auth | HTTP Method | +| :--- | :--- | :--- | +| `/api/v1/chat.reportMessage` | `yes` | `POST` | + +## Payload + +| Argument | Example | Required | Description | +| :--- | :--- | :--- | :--- | +| `messageId` | `7aDSXtjMA3KPLxLjt` | Required | The message id to report. | +| `description` | `test` | Required | The description of report. | + +## Example Call + +```bash +curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \ + -H "X-User-Id: aobEdbYhXfu5hkeqG" \ + -H "Content-type:application/json" \ + http://localhost:3000/api/v1/chat.reportMessage \ + -d '{ "messageId": "7aDSXtjMA3KPLxLjt", "description": "test" }' +``` + +## Example Result + +```json +{ + "success": true +} +``` + +## Change Log + +| Version | Description | +| :--- | :--- | +| 0.64.0 | Added |