Verify Email
POST
/auth/verify-email/
const url = 'https://example.com/auth/verify-email/';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"token":"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/auth/verify-email/ \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Redeem a verification token to activate the account.
A valid single-use expiring token flips email_verified=True, is_active=True, and status=“active” so the user can log in via the existing auth gate in dependencies.py.
Expired, unknown, and already-consumed tokens all return the same “Invalid or expired” error (enumeration-safe).
Request Body required
Section titled “ Request Body required ” Media type application/json
VerifyEmailRequest
object
token
required
Token
Raw opaque verification token from the email link
string
Example generated
{ "token": "example"}Responses
Section titled “ Responses ”Successful Response
Media type application/json
Bad request — invalid query parameters or payload
Media type application/problem+json
Unauthorized — missing or invalid credentials
Media type application/problem+json
Forbidden — caller lacks access to this resource
Media type application/problem+json
Not found
Media type application/problem+json
Validation error
Media type application/problem+json
Too many requests — retry after the advertised interval
Media type application/problem+json
Headers
Section titled “ Headers ” Retry-After
integer
Seconds until the request may be retried
Internal server error
Media type application/problem+json
Service unavailable — the database could not serve the request
Media type application/problem+json