summary refs log tree commit diff
path: root/docs/admin_api/account_validity.rst
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-04-26 18:14:23 +0100
committerErik Johnston <erik@matrix.org>2019-04-26 18:14:23 +0100
commitd6118c5be61aed49f1aa3fac53a25a670bbbd245 (patch)
tree269071e6c6a87cc70a177f48f9546e97a5b0f1e2 /docs/admin_api/account_validity.rst
parentNewsfile (diff)
parentMerge pull request #5103 from matrix-org/rav/fix_notif_loop (diff)
downloadsynapse-d6118c5be61aed49f1aa3fac53a25a670bbbd245.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/ratelimit_3pid_invite
Diffstat (limited to 'docs/admin_api/account_validity.rst')
-rw-r--r--docs/admin_api/account_validity.rst42
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/admin_api/account_validity.rst b/docs/admin_api/account_validity.rst
new file mode 100644
index 0000000000..980ea23605
--- /dev/null
+++ b/docs/admin_api/account_validity.rst
@@ -0,0 +1,42 @@
+Account validity API
+====================
+
+This API allows a server administrator to manage the validity of an account. To
+use it, you must enable the account validity feature (under
+``account_validity``) in Synapse's configuration.
+
+Renew account
+-------------
+
+This API extends the validity of an account by as much time as configured in the
+``period`` parameter from the ``account_validity`` configuration.
+
+The API is::
+
+    POST /_matrix/client/unstable/account_validity/send_mail
+
+with the following body:
+
+.. code:: json
+
+    {
+        "user_id": "<user ID for the account to renew>",
+        "expiration_ts": 0,
+        "enable_renewal_emails": true
+    }
+
+
+``expiration_ts`` is an optional parameter and overrides the expiration date,
+which otherwise defaults to now + validity period.
+
+``enable_renewal_emails`` is also an optional parameter and enables/disables
+sending renewal emails to the user. Defaults to true.
+
+The API returns with the new expiration date for this account, as a timestamp in
+milliseconds since epoch:
+
+.. code:: json
+
+    {
+        "expiration_ts": 0
+    }