Skip to content

PATCH email

Calculus edited this page Mar 21, 2026 · 2 revisions

PATCH /user/email

Change user email.

Note

Requires user password in body for authentication to prevent account theft.

Headers

  • Authorization: Bearer <token>
  • Content-Type: application/json

Body

{
    "email": "string",
    "password": "string"
}

Request Example

PATCH /user/email
Authorization: Bearer <token>
Content-Type: application/json

{
    "email": "new@email.ca",
    "password": "notapassword"
}

Response Example

{
    "message": "Email changed successfully.",
    "status": 200
}

Errors

  • 400 Bad Request Invalid email or password
  • 401 Unauthorized Authentication failed
  • 500 Internal Server Error Something went wrong on the server

Clone this wiki locally