Change the address to the one the code was mailed to.
const url = 'https://example.com/api/user/v1/me/email-change/confirm';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"code":"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/user/v1/me/email-change/confirm \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The code from the mailed link.
Example generated
{ "code": "example"}Responses
Section titled “Responses”The user, with the new address.
object
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "email": "hello@example.com", "google_linked": true, "created_at": "2026-04-15T12:00:00Z"}A malformed body, or a code that is unknown, used, expired or another user’s.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}No access token, or one that is invalid or expired.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}Headers
Section titled “Headers”The token isn’t a user’s, lacks the scope, or the request came from another origin.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}Another account has the address now. The code stays usable.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}The body is larger than 4 KiB.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}Something failed on the server; the request ID leads to the log line.
An RFC 9457 problem.
object
Written for the user.
What is wrong with each field of the request.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "request_id": "example", "errors": { "additionalProperty": "example" }}