requestEmailChangeOtp
Requires a customer (portal or buyer app) session.
Step 1 of changing the buyer's OWN email: send a 6-digit OTP to the NEW address. Authenticated (NOT @Public) — the org comes from the caller's token, and the code proves they control the address they are moving to. Rejects an address already used by another user in the org, and the caller's current address. Distinct from requestEmailOtp, which gates on assertBuyerLoginAllowed and would reject a brand-new address on self-registration-off tenants.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation RequestEmailChangeOtp($input: RequestEmailChangeOtpInput!) {
requestEmailChangeOtp(input: $input)
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RequestEmailChangeOtp($input: RequestEmailChangeOtpInput!) {\n requestEmailChangeOtp(input: $input)\n}",
"variables": {
"input": {
"email": "string"
}
}
}
EOF
Variables:
{
"input": {
"email": "string"
}
}
Response:
{
"data": {
"requestEmailChangeOtp": true
}
}
requestEmailChangeOtp(
input: RequestEmailChangeOtpInput!
): Boolean!
Arguments
requestEmailChangeOtp.input ● RequestEmailChangeOtpInput! non-null input
The details of the request email change otp request.
Type
Boolean scalar
The Boolean scalar type represents true or false.