View Categories

Verify the phone number

< 1 min read

Verify Phone Number #

Confirms the SMS code received by the user and marks the phone number as verified.

Endpoint #

POST https://api-test.10npay.com/User/phone-number/verify

Headers #

  • Authorization: Bearer <access_token>
  • Content-Type: application/json

Request Body #

{
  "id": 2077,
  "code": "714982",
  "correlationType": 0
}
Field Type Description
id integer User identifier. Required.
code string SMS code received by the user. Required.
correlationType integer (enum) Optional context flag (0 default).

Responses #

  • 200 OK — phone marked as verified.
  • 400 Bad Request — incorrect or expired code.
  • 401 Unauthorized — missing/expired Bearer token.
  • 404 Not Found — unknown userId.
  • 5xx — server error (retry with backoff).

Notes #

  • Only the latest code sent via POST /User/phone-number/send-code or /User/{id}/phone-number/resend-code is valid.
  • On success, isPhoneNumberVerified becomes true in GET /User/{id}/status.
  • Consider locking the UI after several failed attempts to prevent brute-force guessing.