Change the account email
/auth/v1/users/current/emails/changeStarts changing the authenticated account's email address. A verification
code is sent to the new address; the change is applied only after the code
is confirmed via POST /auth/v1/email/verify. Subject to rate limiting per account.
Authorization
Bearer In: header
Request Body
requiredapplication/json{
"new_email": "string"
}Response Body
200application/json
Verification code sent to the new address
type: object
400application/json
Malformed request or invalid email
type: object
HTTP status code
Optional details about the error
Error message describing what went wrong
401application/json
Missing or invalid access token
type: object
HTTP status code
Optional details about the error
Error message describing what went wrong
409application/json
Email already in use by another account
type: object
HTTP status code
Optional details about the error
Error message describing what went wrong
429application/json
Too many verification requests
type: object
HTTP status code
Optional details about the error
Error message describing what went wrong
curl -X PUT "https://api.rixl.com/auth/v1/users/current/emails/change" \
-H "Content-Type: application/json" \
-d '{
"new_email": "string"
}'const body = JSON.stringify({
"new_email": "string"
})
fetch("https://api.rixl.com/auth/v1/users/current/emails/change", {
method: "PUT",
headers: {
"Content-Type": "application/json"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.rixl.com/auth/v1/users/current/emails/change"
body := strings.NewReader(`{
"new_email": "string"
}`)
req, _ := http.NewRequest("PUT", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.rixl.com/auth/v1/users/current/emails/change"
body = """{
"new_email": "string"
}"""
response = requests.request("PUT", url, data = body, headers = {
"Content-Type": "application/json"
})
print(response.text)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
import java.net.http.HttpRequest.BodyPublishers;
var body = BodyPublishers.ofString("""{
"new_email": "string"
}""");
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://api.rixl.com/auth/v1/users/current/emails/change"))
.header("Content-Type", "application/json")
.PUT(body)
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}using System;
using System.Net.Http;
using System.Text;
var body = new StringContent("""
{
"new_email": "string"
}
""", Encoding.UTF8, "application/json");
var client = new HttpClient();
var response = await client.PutAsync("https://api.rixl.com/auth/v1/users/current/emails/change", body);
var responseBody = await response.Content.ReadAsStringAsync();Verification code sent to the new address
application/json
{
"can_resend_at": "string",
"code_sent": true,
"message": "string",
"verification_id": "string"
}Malformed request or invalid email
application/json
{
"code": 400,
"details": "The provided ID is not valid",
"error": "Malformed request or invalid email"
}Missing or invalid access token
application/json
{
"code": 401,
"details": "The provided ID is not valid",
"error": "Missing or invalid access token"
}Email already in use by another account
application/json
{
"code": 409,
"details": "The provided ID is not valid",
"error": "Email already in use by another account"
}Too many verification requests
application/json
{
"code": 429,
"details": "The provided ID is not valid",
"error": "Too many verification requests"
}Add an email address POST
Adds an email address to the authenticated account and sends a verification code to it. The address becomes active only once it has been verified via `POST /auth/v1/email/verify`. Subject to rate limiting per account.
Leave an organization DELETE
Removes the authenticated user's own membership from the organization.