diff options
author | Quentin Gliech <quenting@element.io> | 2023-05-17 16:39:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 14:39:06 +0000 |
commit | 41b9def9f2c02118796e147f63abf23bc2d7dc04 (patch) | |
tree | 8059221dc29f8931f0661ee59dfc7f1d004de36f /docs | |
parent | Apply url_preview_url_blacklist to oEmbed and pre-cached images (#15601) (diff) | |
download | synapse-41b9def9f2c02118796e147f63abf23bc2d7dc04.tar.xz |
Add a new admin API to create a new device for a user. (#15611)
This allows an external service (e.g. the matrix-authentication-service) to create devices for users.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/admin_api/user_admin_api.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/admin_api/user_admin_api.md b/docs/admin_api/user_admin_api.md index 6b952ba396..229942b311 100644 --- a/docs/admin_api/user_admin_api.md +++ b/docs/admin_api/user_admin_api.md @@ -813,6 +813,33 @@ The following fields are returned in the JSON response body: - `total` - Total number of user's devices. +### Create a device + +Creates a new device for a specific `user_id` and `device_id`. Does nothing if the `device_id` +exists already. + +The API is: + +``` +POST /_synapse/admin/v2/users/<user_id>/devices + +{ + "device_id": "QBUAZIFURK" +} +``` + +An empty JSON dict is returned. + +**Parameters** + +The following parameters should be set in the URL: + +- `user_id` - fully qualified: for example, `@user:server.com`. + +The following fields are required in the JSON request body: + +- `device_id` - The device ID to create. + ### Delete multiple devices Deletes the given devices for a specific `user_id`, and invalidates any access token associated with them. |