> ## Documentation Index
> Fetch the complete documentation index at: https://docs.holacati.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update phone number

> Updates the phone number of the authenticated mobile app user after validating an SMS code to the new phone number. The user's token is passed in the body.



## OpenAPI

````yaml api-reference/openapi.json post /update-user-phone-number
openapi: 3.0.0
info:
  title: Cati Main Server API
  version: 1.0.0
  description: >-
    API for managing Cati assistant users, app users, contacts, media,
    notifications and preferences.
servers:
  - url: /
security: []
paths:
  /update-user-phone-number:
    post:
      tags:
        - Authentication & Users
      summary: Update mobile app user's phone number
      description: >-
        Updates the phone number of the authenticated mobile app user after
        validating an SMS code to the new phone number. The user's token is
        passed in the body.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserPhoneNumberRequest'
      responses:
        '200':
          description: Phone number updated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Invalid SMS code.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid or expired token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Database or server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UpdateUserPhoneNumberRequest:
      type: object
      required:
        - token
        - phone
        - code
      properties:
        token:
          type: string
          description: JWT Access Token of the user.
          example: eyJ...
        phone:
          type: string
          example: '+34698765432'
        code:
          type: string
          description: SMS verification code for the new phone number.
          example: '654321'
    SuccessResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
          example: Operation completed successfully
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Database connection failed

````