Skip to content

Verify Email Link

POST
/api/auth/email/verify
curl --request POST \
--url https://example.com/api/auth/email/verify \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "hello@example.com", "code": "example" }'

Verify a code and link the email address to the current user’s account.

The code must match the one sent via POST /api/auth/email/request. After verification, the email is set on the user record.

Media type application/json
EmailVerifyRequest
object
email
required
Email
string format: email
code
required
Code
string
Example generated
{
"email": "hello@example.com",
"code": "example"
}

Successful Response

Media type application/json
Example generated
example

Validation Error

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