POST /v1/auth/me/phone
POST /v1/auth/me/phone — change phone in one shot: the body
carries the new phone AND the 6-digit OTP the user just received
at that number via POST /v1/auth/phone/send-code. Sudo-gated.
Tags: auth
Request body
Required.
JSON
{
"$ref": "#/components/schemas/ChangePhoneRequest"
}Responses
200
JSON
{
"$ref": "#/components/schemas/ChangePhoneResponse"
}400 — INVALID_OTP / bad phone shape
401 — UNAUTHENTICATED — missing session OR fresh password proof
Code samples
TypeScript
TypeScript
import { firecase } from "@firecase/sdk";
const result = await firecase.post("/auth/me/phone", { /* body */ });
console.log(result);Python
Python
import firecase
result = firecase.post("/auth/me/phone", json={})
print(result)curl
Bash
curl -X POST https://api.firecase.ai/v1/auth/me/phone \
-H "Authorization: Bearer $FIRECASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'