From 51ec7c355d6c3137ba0197ce6f54d941ada93f5d Mon Sep 17 00:00:00 2001 From: clokep Date: Tue, 17 Oct 2023 15:57:19 +0000 Subject: deploy: 6e6d611f555245a8302396936dd4dae1f28e3b2a --- v1.95/admin_api/server_notices.html | 220 ++++++++++++++++++++++++++++++++++++ 1 file changed, 220 insertions(+) create mode 100644 v1.95/admin_api/server_notices.html (limited to 'v1.95/admin_api/server_notices.html') diff --git a/v1.95/admin_api/server_notices.html b/v1.95/admin_api/server_notices.html new file mode 100644 index 0000000000..fdb9641d8c --- /dev/null +++ b/v1.95/admin_api/server_notices.html @@ -0,0 +1,220 @@ + + + + + + Server Notices - Synapse + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + +
+
+ +
+ +
+ +

Server Notices

+

The API to send notices is as follows:

+
POST /_synapse/admin/v1/send_server_notice
+
+

or:

+
PUT /_synapse/admin/v1/send_server_notice/{txnId}
+
+

You will need to authenticate with an access token for an admin user.

+

When using the PUT form, retransmissions with the same transaction ID will be +ignored in the same way as with PUT /_matrix/client/r0/rooms/{roomId}/send/{eventType}/{txnId}.

+

The request body should look something like the following:

+
{
+    "user_id": "@target_user:server_name",
+    "content": {
+        "msgtype": "m.text",
+        "body": "This is my message"
+    }
+}
+
+

You can optionally include the following additional parameters:

+
    +
  • type: the type of event. Defaults to m.room.message.
  • +
  • state_key: Setting this will result in a state event being sent.
  • +
+

Once the notice has been sent, the API will return the following response:

+
{
+    "event_id": "<event_id>"
+}
+
+

Note that server notices must be enabled in homeserver.yaml before this API +can be used. See the server notices documentation for more information.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + \ No newline at end of file -- cgit 1.5.1