summary refs log tree commit diff
path: root/docs/admin_api/account_validity.md
diff options
context:
space:
mode:
authorAndrew Morgan <1342360+anoadragon453@users.noreply.github.com>2021-06-03 14:06:03 +0100
committerGitHub <noreply@github.com>2021-06-03 14:06:03 +0100
commit73636cab69c32746ef6b7708deeeb0c718b7b3b9 (patch)
tree9d4354f02e85218e82ea3e4d7fe3acc17869c02b /docs/admin_api/account_validity.md
parentr0.6.1 support: /rooms/:roomId/aliases endpoint (#9224) (diff)
downloadsynapse-73636cab69c32746ef6b7708deeeb0c718b7b3b9.tar.xz
Convert admin api docs to markdown (#10089)
So that they render nicely in mdbook (see #10086), and so that we no longer have a mix of structured text languages in our documentation (excluding files outside of `docs/`).
Diffstat (limited to 'docs/admin_api/account_validity.md')
-rw-r--r--docs/admin_api/account_validity.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/admin_api/account_validity.md b/docs/admin_api/account_validity.md
new file mode 100644
index 0000000000..b74b5d0c1a
--- /dev/null
+++ b/docs/admin_api/account_validity.md
@@ -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 /_synapse/admin/v1/account_validity/validity
+```
+
+with the following body:
+
+```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:
+
+```json
+{
+    "expiration_ts": 0
+}
+```