POST /v1/auth/me/email/confirm

POST /v1/auth/me/email/confirm — consume the emailed confirmation token. The link is the proof; no sudo required (the user proved control of the new address by clicking the link). On success, all sessions are revoked — the user re-signs-in with the new email.

Tags: auth

Request body

Required.

JSON
{
  "$ref": "#/components/schemas/ConfirmEmailChangeRequest"
}

Responses

204 — Email changed; all sessions revoked.

400 — INVALID_REQUEST — bad / expired / already-used token.

Code samples

TypeScript

TypeScript
import { firecase } from "@firecase/sdk";

const result = await firecase.post("/auth/me/email/confirm", { /* body */ });
console.log(result);

Python

Python
import firecase

result = firecase.post("/auth/me/email/confirm", json={})
print(result)

curl

Bash
curl -X POST https://api.firecase.ai/v1/auth/me/email/confirm \
  -H "Authorization: Bearer $FIRECASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'