diff --git a/api/client-server/administrative_contact.yaml b/api/client-server/administrative_contact.yaml index 02057758..a6e060e4 100644 --- a/api/client-server/administrative_contact.yaml +++ b/api/client-server/administrative_contact.yaml @@ -119,3 +119,12 @@ paths: } tags: - User data + "/account/3pid/email/requestToken": + post: + summary: Requests a validation token be sent to the given email address + description: |- + Proxies the identity server API ``validate/email/requestToken``, but + first checks that the given email address is not already associated + with an account on this Home Server. This API should be used to request + validation tokens when adding an email address to an account. This API + behaves identically to `/register/email/requestToken` diff --git a/api/client-server/registration.yaml b/api/client-server/registration.yaml index f2e50390..f802686f 100644 --- a/api/client-server/registration.yaml +++ b/api/client-server/registration.yaml @@ -242,3 +242,16 @@ paths: "$ref": "definitions/error.yaml" tags: - User data + "/account/password/email/requestToken": + post: + summary: Requests a validation token be sent to the given email address + description: |- + Proxies the identity server API ``validate/email/requestToken``, but + first checks that the given email address is associated with an account + on this Home Server. This API should be used to request + validation tokens when authenticating for the + `account/password` endpoint. This API behaves identically to + `/register/email/requestToken` except that `M_THREEPID_NOT_FOUND` may be + returned if no account matching the given email address could be found. + The server may instead send an email to the given address prompting + the user to create an account. `M_THREEPID_IN_USE` may not be returned. diff --git a/specification/client_server_api.rst b/specification/client_server_api.rst index 1e9feaff..00024e42 100644 --- a/specification/client_server_api.rst +++ b/specification/client_server_api.rst @@ -116,6 +116,9 @@ Some requests have unique error codes: :``M_THREEPID_IN_USE``: Sent when a threepid given to an API cannot be used because the same threepid is already in use. +:``M_THREEPID_NOT_FOUND``: + Sent when a threepid given to an API cannot be used because no record matching the threepid was found + :``M_SERVER_NOT_TRUSTED``: The client's request used a third party server, eg. ID server, that this server does not trust.