diff --git a/api/client-server/registration.yaml b/api/client-server/registration.yaml index a161c79b9..11587cb49 100644 --- a/api/client-server/registration.yaml +++ b/api/client-server/registration.yaml @@ -276,3 +276,47 @@ paths: responses: 200: description: An email was sent to the given address + "/account/deactivate": + post: + summary: "Deactivate a user's account." + description: |- + Deactivate the user's account, removing all ability for the user to + login again. + + This API endpoint uses the `User-Interactive Authentication API`_. + + An access token should be submitted to this endpoint if the client has + an active session. + + The homeserver may change the flows available depending on whether a + valid access token is provided. + security: + - accessToken: [] + parameters: + - in: body + name: body + schema: + type: object + properties: + auth: + description: |- + Additional authentication information for the user-interactive authentication API. + "$ref": "definitions/auth_data.yaml" + responses: + 200: + description: The account has been deactivated. + examples: + application/json: "{}" + schema: + type: object + 401: + description: |- + The homeserver requires additional authentication information. + schema: + "$ref": "definitions/auth_response.yaml" + 429: + description: This request was rate-limited. + schema: + "$ref": "definitions/error.yaml" + tags: + - User data diff --git a/changelogs/client_server.rst b/changelogs/client_server.rst index 081d7d34f..8e90d3b7b 100644 --- a/changelogs/client_server.rst +++ b/changelogs/client_server.rst @@ -1,6 +1,12 @@ ==================== +- Changes to the API which will be backwards-compatible for clients: + + - New endpoints: + + - ``POST /account/deactivate`` + - Spec clarifications - Make it clear that ``GET /directory/room/{roomAlias}`` must work for