Skip to main content
Use this endpoint to update a user’s email address within your project. The user is identified by their current email and updated with a new email address.
POST
https://api.taag.cc/v1/users/update/email

Authorization

All you need is to include your secret key as a value of authorization in the header and hit the endpoint above.
Authorization: taag_sk_mode_xxxxxxxxx
Authorization
string
required
Use the secret key that matches the mode you are in TEST or LIVE

Request Body

Provide both the current email address and the new email address for the user.
{
  "oldEmail": "[email protected]",
  "newEmail": "[email protected]"
}
oldEmail
string
required
The current email address of the user you want to update
newEmail
string
required
The new email address to assign to the user. Must be a valid email format and not already in use by another user in this project.
  • The new email must be different from the old email
  • The new email cannot already be in use by another user in the same project and mode
  • Users are scoped to both project and mode (TEST or LIVE)

Response

If the email is updated successfully, you will receive a confirmation with the update details.
{
  "success": true,
  "message": "User email updated successfully",
  "data": {
    "oldEmail": "[email protected]",
    "newEmail": "[email protected]",
    "mode": "TEST",
    "updatedAt": "2025-12-12T14:30:00.000Z"
  }
}

Error Responses

Returned when either oldEmail or newEmail is missing.
{ 
    "success": false, 
    "error": "Missing required fields", 
    "description": "oldEmail and newEmail are required" 
} 
Returned when the old email format is invalid.
{ 
    "success": false, 
    "error": "Invalid old email format", 
    "description": "Please provide a valid old email address" 
} 
Returned when the new email format is invalid.
{ 
    "success": false, 
    "error": "Invalid new email format", 
    "description": "Please provide a valid new email address" 
} 
Returned when the old and new email addresses are the same.
{ 
    "success": false, 
    "error": "Emails are identical", 
    "description": "The new email must be different from the old email" 
} 
Returned when no user exists with the provided old email address.
{ 
    "success": false, 
    "error": "User not found", 
    "description": "No user found with email [email protected] in this project" 
} 
Returned when the new email is already in use by another user.
{ 
    "success": false, 
    "error": "Email already in use", 
    "description": "Email [email protected] is already used by another user in this project" 
} 
Returned when an unexpected error occurs.
{ 
    "success": false, 
    "error": "Internal Server Error", 
    "description": "An unexpected error occurred while updating the user email. Please try again or contact support if the issue persists." 
}