Skip to content

Commit b835760

Browse files
Marcos Spessatto Defendisampaiodiego
authored andcommitted
Add REST groups setAnnouncement docs (RocketChat#894)
1 parent d1bc6b6 commit b835760

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

_data/toc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@
307307
- removeOwner
308308
- rename
309309
- roles
310+
- setAnnouncement
310311
- setCustomFields
311312
- setDescription
312313
- setPurpose

contributing/documentation/documentation-map/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ Here you can also find what articles are incomplete and missing.
334334
- removeOwner
335335
- rename
336336
- roles
337+
- setAnnouncement
337338
- setCustomFields
338339
- setDescription
339340
- setPurpose

developer-guides/rest-api/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ When calling a production Rocket.Chat server, ensure it is running via HTTPS and
128128
| `/api/v1/groups.open` | Adds the private group back to the list of groups. | [Link](groups/open/) |
129129
| `/api/v1/groups.rename` | Changes the name of the private group. | [Link](groups/rename/) |
130130
| `/api/v1/groups.roles` | Gets the user's roles in the private group. | [Link](groups/roles/) |
131+
| `/api/v1/groups.setAnnouncement` | Sets a group's announcement. | [Link](groups/setannouncement/)|
131132
| `/api/v1/groups.setCustomFields` | Sets private group's custom fields. | [Link](groups/setcustomfields/)|
132133
| `/api/v1/groups.setDescription` | Sets a private group's description. | [Link](groups/setdescription/) |
133134
| `/api/v1/groups.setPurpose` | Sets a private group's description. | [Link](groups/setpurpose/) |

developer-guides/rest-api/groups/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
| `/api/v1/groups.removeOwner` | Removes the role of owner from a user in a group. | [Link](removeowner/) |
2626
| `/api/v1/groups.rename` | Changes the name of the private group. | [Link](rename/) |
2727
| `/api/v1/groups.roles` | Gets the user's roles in the private group. | [Link](roles/) |
28+
| `/api/v1/groups.setAnnouncement` | Sets a group's announcement. | [Link](setannouncement/)|
2829
| `/api/v1/groups.setCustomFields` | Sets private group's custom fields. | [Link](setcustomfields/) |
2930
| `/api/v1/groups.setDescription` | Sets a private group's description. | [Link](setdescription/) |
3031
| `/api/v1/groups.setPurpose` | Sets a private group's description. | [Link](setpurpose/) |
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Group Set Announcement
2+
3+
Sets the announcement for the group.
4+
5+
| URL | Requires Auth | HTTP Method |
6+
| :--- | :--- | :--- |
7+
| `/api/v1/groups.setAnnouncement` | `yes` | `POST` |
8+
9+
## Payload
10+
11+
| Argument | Example | Required | Announcement |
12+
| :--- | :--- | :--- | :--- |
13+
| `roomId` | `ByehQjC44FwMeiLbX` | Required | The group's id |
14+
| `announcement` | `Test out everything.` | Required | The announcement to set for the group. |
15+
16+
## Example Call
17+
18+
```bash
19+
curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
20+
-H "X-User-Id: aobEdbYhXfu5hkeqG" \
21+
-H "Content-type: application/json" \
22+
http://localhost:3000/api/v1/groups.setAnnouncement \
23+
-d '{ "roomId": "ByehQjC44FwMeiLbX", "announcement": "Test out everything" }'
24+
```
25+
26+
## Example Result
27+
28+
```json
29+
{
30+
"announcement": "Test out everything.",
31+
"success": true
32+
}
33+
```
34+
35+
## Change Log
36+
37+
| Version | Description |
38+
| :--- | :--- |
39+
| 0.70.0 | Added |

0 commit comments

Comments
 (0)