Change phone for Persoanl Account Holder with OTP

Change Phone for Personal Account Holder with OTP

This endpoint allows personal account holders to securely update their phone number by providing a one-time password (OTP). The OTP verifies the account holder's identity before applying the change, ensuring that only the legitimate account owner can modify contact information. This process helps maintain accurate records and strengthens account security.

Endpoint

POST /api/account/changePhoneOtp

Authentication

Bearer token required. Obtain via:

POST https://api.banking.netevia.dev/api/auth/v2

Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.

When to use

Use this endpoint when a personal account holder needs to update the phone number on file for their account. Before calling this endpoint, an OTP must have been issued to the user (via the appropriate OTP request flow) so they can provide it to authorize the change. This endpoint is applicable to personal customers only; business account phone updates follow a different flow.

Request Body

FieldTypeRequiredDescription
phonestringYesThe new phone number to associate with the account. Minimum length: 1 character. Example: "1234567890".
oneTimeCodestringYesThe 6-digit OTP received by the account holder to verify their identity. Must match pattern ^\d{6}$.
secureOperationTypestringYesThe type of secure operation being performed. Use "ShortMessageCode" for SMS-based OTP. Allowed values: ShortMessageCode, TimeBasedCode, LegacyTimeBasedCode.
{
  "phone": "1234567890",
  "oneTimeCode": "482931",
  "secureOperationType": "ShortMessageCode"
}

Response

200 OK

A 200 Success response indicates the phone number was successfully updated. No response body fields are returned.

{}

Error Codes

CodeWhen it happens
400Missing required fields, invalid OTP format, or phone number fails validation
401Token missing, expired, or invalid
403Insufficient permissions or OTP mismatch/expired
404Account not found
500Internal server error

Common Mistakes

  • Submitting a oneTimeCode that does not match the 6-digit pattern (^\d{6}$) — the value must be exactly 6 numeric digits.
  • Using the wrong secureOperationType value; for standard SMS OTP, always use "ShortMessageCode".
  • Calling this endpoint without first triggering an OTP send, resulting in an invalid or expired code error.
  • Attempting to use this endpoint for business account holders — this endpoint is for personal customers only.

Related Endpoints

  • POST /api/account/changePhone — Change phone number for a personal account holder without OTP (non-secured variant)
  • POST /api/auth/v2 — Obtain a Bearer authentication token
  • POST /api/auth/refresh — Refresh an existing Bearer token

Example

curl -X POST https://api.banking.netevia.dev/api/account/changePhoneOtp \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "1234567890",
    "oneTimeCode": "482931",
    "secureOperationType": "ShortMessageCode"
  }'
Body Params
string
required
length ≥ 1
^\d{6}$
string
enum
required
Allowed:
string
required
length ≥ 1
Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response
200

Success

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here!