Change Address with OTP
This endpoint allows personal customers to update their residential or mailing address by providing a one-time password (OTP) to verify their identity. It accepts the new street address, extended address, postal code, city, and state along with a valid OTP and the secure operation type. Only personal customer accounts are supported by this endpoint.
Endpoint
POST /api/account/changeAddressOtp
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 customer needs to update their address information on file, such as after moving to a new residence. The OTP requirement ensures that only the authenticated account holder can make changes, protecting against unauthorized address modifications. This endpoint is suitable for both residential and mailing address updates.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| streetAddress | string | Yes | New street address in the format "123 Avenue Street". Minimum 1 character. Must match standard US street address format. |
| extendedAddress | string | No | Additional address details such as apartment or suite number (e.g., "Apt 5B"). |
| postalCode | string | Yes | 5-digit US postal code (e.g., "10001"). Must match pattern ^\d{5}$. |
| city | string | Yes | City name for the new address. Minimum 1 character. |
| state | integer (int32) | Yes | Integer code representing the US state or territory (1–53). |
| oneTimeCode | string | Yes | 6-digit OTP sent to the customer for identity verification. Must match pattern ^\d{6}$. |
| secureOperationType | string | Yes | Type of secure operation used for OTP delivery. Accepted values: ShortMessageCode, TimeBasedCode, LegacyTimeBasedCode. |
{
"streetAddress": "456 Elm Street",
"extendedAddress": "Apt 5B",
"postalCode": "10001",
"city": "New York",
"state": 33,
"oneTimeCode": "789456",
"secureOperationType": "ShortMessageCode"
}Response
200 OK
A 200 response indicates the address was successfully updated. No additional response body fields are returned.
{}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields, invalid OTP format, invalid postal code format, or invalid street address format |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions or the account type does not support this operation (e.g., business accounts) |
| 404 | Customer account not found |
| 500 | Internal server error |
Common Mistakes
- Providing
stateas a string (e.g.,"NY") instead of the required integer code (e.g.,33). - Submitting an
oneTimeCodethat is not exactly 6 digits — the field requires the pattern^\d{6}$. - Using an incorrect
secureOperationTypevalue; onlyShortMessageCode,TimeBasedCode, orLegacyTimeBasedCodeare accepted. - Providing a
postalCodethat is not exactly 5 digits; extended ZIP+4 formats (e.g., "10001-1234") are not accepted. - Formatting
streetAddressincorrectly — it must begin with a number followed by a street name (e.g., "456 Elm Street"). - Attempting to use this endpoint for a business customer account; it is intended for personal customers only.
Related Endpoints
POST /api/account/changeAddress— Change personal address without OTP verificationPOST /api/auth/v2— Obtain a Bearer token for authenticationPOST /api/auth/refresh— Refresh an existing Bearer token
Example
curl -X POST https://api.banking.netevia.dev/api/account/changeAddressOtp \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"streetAddress": "456 Elm Street",
"extendedAddress": "Apt 5B",
"postalCode": "10001",
"city": "New York",
"state": 33,
"oneTimeCode": "789456",
"secureOperationType": "ShortMessageCode"
}' 200Success
