Request an email change.
POST
/api/auth/v1/change_email/request
const url = 'https://example.com/api/auth/v1/change_email/request';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"csrf_token":"example","err_redirect_uri":"example","new_email":"example","old_email":"example","redirect_uri":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/auth/v1/change_email/request \ --header 'Content-Type: application/json' \ --data '{ "csrf_token": "example", "err_redirect_uri": "example", "new_email": "example", "old_email": "example", "redirect_uri": "example" }'Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” redirect_uri
string | null
Success (and error if err_redirect_uri not present) redirect target for non-JSON requests.
err_redirect_uri
string | null
Error redirect target for non-JSON requests.
Request Body required
Section titled “Request Body required ” Media type application/json
object
csrf_token
required
string
err_redirect_uri
Error redirect target for non-JSON requests.
string | null
new_email
required
string
old_email
Old email address. Only required in form mode.
string | null
redirect_uri
Success (and error if err_redirect_uri not present) redirect target for non-JSON requests.
string | null
Example generated
{ "csrf_token": "example", "err_redirect_uri": "example", "new_email": "example", "old_email": "example", "redirect_uri": "example"}Responses
Section titled “ Responses ”Success, when redirect_uri is not present and JSON input
Success, when redirect_uri is present or HTML form input
Bad request.
User conflict.
Too many attempts.