@xfloor-memory-sdk
  1. Registration
@xfloor-memory-sdk
  • Get Started
    • Overview
    • Quick Start
    • Authentication and Identification
    • Core Concepts (5-Minute Read)
    • What to Use First (API Map)
  • SDK
    • Overview
    • SDK Installation & Setup
    • Python SDK
    • JavaScript SDK
    • Typescript SDK
    • Java SDK
    • FAQ & Troubleshooting
    • Copy-Paste Debug Checklists
  • Core FloorMemory
    • Query (Primary API)
      POST
    • Create Event (Post Content)
      POST
    • Recent Events
      GET
    • Basic information of a floor
      GET
  • Floor Management
    • Edit floor
    • Make floor Private
    • Make floor public
    • Rename floor
  • Registration
    • Sign Up
      POST
    • Sign In with email ID
      POST
    • Sign In with Mobile number
      POST
    • Validation
      POST
    • Change Password
      POST
    • Reset Password
      POST
    • Change email ID
      POST
    • Change Mobile number
      POST
    • Send Validation code
      POST
    • External User Registration
      POST
  • SDKs
  • Schemas
    • PostAdd
    • QueryResponse
    • Media
    • UserDetails
    • SignUpResponse
    • BlockDetails
    • FloorInfo
    • Threads
    • EventResponse
    • 400ErrorCode
    • Remaining
  1. Registration

Change Mobile number

POST
/auth-service/change/mobile
Updates the mobile number associated with an existing user account after validating a one-time activation code sent to the new mobile number.
This operation can only be performed by a logged-in user. When a user initiates a mobile number change, an activation code is sent to the newly provided mobile number. The mobile number update takes effect only after the activation code is successfully validated.
If the activation code validation fails, the mobile number remains unchanged.

Authentication#

This endpoint requires Bearer Token authentication.
Authorization: Bearer <access_token>

Request Body#

{
  "user_id": "string",
  "new_mobile_number": "string",
  "activation_code": "string"
}
Field Description
user_id – Unique identifier of the logged-in user
new_mobile_number – New mobile number to be associated with the account
activation_code – One-time activation code sent to the new mobile number for verification

Flow Summary#

1.
User is authenticated and logged in
2.
User requests to change mobile number
3.
System sends an activation code to the new mobile number
4.
User submits the activation code via this API
5.
On successful validation, the mobile number is updated

Successful Response#

On successful validation:
The activation code is verified
The user’s mobile number is updated immediately
A success string is returned confirming the mobile number change

Error Response#

The API returns an error response if:
The activation code is invalid or expired
The activation code does not match the user or mobile number
The new mobile number is already in use
Authorization fails or the bearer token is missing or invalid
In all error cases, the existing mobile number remains unchanged.

Behavior Notes#

Requires a prior call to /auth-service/send/validation/code with the proper mode.

Security Notes (Recommended)#

Activation codes are single-use and time-bound
Mobile number changes require prior authentication
Rate limiting may be applied to prevent abuse

One-Line Summary#

Changes a user’s mobile number after validating an activation code sent to the new mobile number.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params multipart/form-dataRequired

Responses

🟢200Success
application/json
Body

🟠400BadRequest
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://appfloor.in/auth-service/change/mobile' \
--header 'Authorization: Bearer <token>' \
--form 'new_mobile_number=""' \
--form 'activation_code=""'
Response Response Example
200 - Example 1
"error": {
    "code": "XF_VALIDATION_ERROR",
    "message": "The user details does not exist",
    "path": "/auth-service/change/mobile",
    "timestamp": "2026-01-12T08:11:59.993079561Z"
}
Modified at 2026-03-02 15:01:15
Previous
Change email ID
Next
Send Validation code
Built with