Skip to content

Confirm Email Change

POST
/api/users/me/email/change/confirm
curl --request POST \
--url https://example.com/api/users/me/email/change/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "token": "example" }'

Confirm a pending email change with the token mailed to the new address.

The new address comes from current_user.pending_email (set server-side when the change was requested), never from client input — the token alone doesn’t encode it, so trusting a client-resubmitted email would let the confirm step cut over to an address that was never actually proven reachable.

Media type application/json
EmailChangeConfirm

Confirm a pending email change with the token mailed to the new address.

object
token
required
Token
string
Example generated
{
"token": "example"
}

Successful Response

Media type application/json
Example generated
example

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}