Email change flow
Initiate email change
POST
/email/changeStart email change flow (session-authed, requires password)
Request Body
{
"new_email": "user@example.com",
"password": "string"
}
Code Examples
curl -X POST "https://platform.antfly.io/api/v1/email/change" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"new_email": "user@example.com",
"password": "string"
}'const response = await fetch("https://platform.antfly.io/api/v1/email/change", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"new_email": "user@example.com",
"password": "string"
})
});
const data = await response.json();Responses
{
"success": true
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}Confirm email change
POST
/email/confirmConfirm email change with token from verification email
Request Body
{
"token": "string"
}
Code Examples
curl -X POST "https://platform.antfly.io/api/v1/email/confirm" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"token": "string"
}'const response = await fetch("https://platform.antfly.io/api/v1/email/confirm", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"token": "string"
})
});
const data = await response.json();Responses
{
"success": true
}{
"error": "string",
"message": "string"
}{
"error": "string",
"message": "string"
}