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

# Update user (PUT)

> Fully update user information



## OpenAPI

````yaml /api-reference/openapi.yaml put /users/{user_id}
openapi: 3.1.0
info:
  title: ONVY Health API
  description: >-
    AI-powered holistic health services API with data merging and metrics
    calculation
  version: 1.0.0
  contact:
    name: ONVY Support
    email: support@onvy.health
    url: https://onvy.health
  license:
    name: Proprietary
    url: https://onvy.health/terms
servers:
  - url: https://api.onvy.health
    description: Public API
security:
  - bearerAuth: []
tags:
  - name: static
    description: Static configuration endpoints
  - name: users
    description: User management
  - name: baselines
    description: User baseline metrics
  - name: daily-records
    description: Daily health records
  - name: chat
    description: AI chat completions
  - name: facts
    description: User facts for individualization
  - name: activities
    description: User activities (workouts and mindfulness sessions)
  - name: ai-summaries
    description: |
      AI-generated summaries. This is how ONVY exposes domain-specific
      insights such as meal nutrition analysis, sleep insights, workouts,
      and daily, weekly, nutrition, trend, and impact analysis. Most
      summary types are system-generated; the public create surface
      currently accepts `type=meal`.
  - name: custom-records
    description: Custom records and types
  - name: meals
    description: Nutrition meal tracking
paths:
  /users/{user_id}:
    put:
      tags:
        - users
      summary: Update user (PUT)
      description: Fully update user information
      operationId: updateUserPut
      parameters:
        - $ref: '#/components/parameters/UserIdParam'
      requestBody:
        description: Complete user data for update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequest'
      responses:
        '200':
          description: User updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    UserIdParam:
      name: user_id
      in: path
      required: true
      description: User ID (e.g., google_104940819145861640201)
      schema:
        type: string
  schemas:
    CreateUserRequest:
      title: CreateUserRequest
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: User ID (customer-provided, unique per project)
        language:
          type: string
          description: User's preferred language
        tz_offset:
          type: integer
          description: Timezone offset in seconds
        firstname:
          type: string
        lastname:
          type: string
        measurement_unit:
          type: string
          enum:
            - metric
            - imperial
          default: metric
          description: Preferred measurement unit system
        gender:
          type: string
          enum:
            - male
            - female
            - other
        birthday:
          type: string
          format: date
        height:
          type: number
          description: Height in cm
        weight:
          type: number
          description: Weight in kg
        thresholds:
          type: object
          properties:
            ftp:
              type: integer
              description: Functional Threshold Power
            lthr:
              type: integer
              description: Lactate Threshold Heart Rate
            mhr:
              type: integer
              description: Maximum Heart Rate
        location:
          type: object
          properties:
            lat:
              type: number
              description: Latitude
            lon:
              type: number
              description: Longitude
        coach_config:
          type: object
          properties:
            enabled:
              type: boolean
              description: Whether proactive coaching is enabled
    User:
      title: User
      allOf:
        - title: CreateUserRequest
          type: object
          required:
            - id
          properties:
            id:
              type: string
              description: User ID (customer-provided, unique per project)
            language:
              type: string
              description: User's preferred language
            tz_offset:
              type: integer
              description: Timezone offset in seconds
            firstname:
              type: string
            lastname:
              type: string
            measurement_unit:
              type: string
              enum:
                - metric
                - imperial
              default: metric
              description: Preferred measurement unit system
            gender:
              type: string
              enum:
                - male
                - female
                - other
            birthday:
              type: string
              format: date
            height:
              type: number
              description: Height in cm
            weight:
              type: number
              description: Weight in kg
            thresholds:
              type: object
              properties:
                ftp:
                  type: integer
                  description: Functional Threshold Power
                lthr:
                  type: integer
                  description: Lactate Threshold Heart Rate
                mhr:
                  type: integer
                  description: Maximum Heart Rate
            location:
              type: object
              properties:
                lat:
                  type: number
                  description: Latitude
                lon:
                  type: number
                  description: Longitude
            coach_config:
              type: object
              properties:
                enabled:
                  type: boolean
                  description: Whether proactive coaching is enabled
        - type: object
          required:
            - created_at
            - updated_at
          properties:
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
            data_syncs:
              type: array
              items:
                type: object
                properties:
                  data_type:
                    type: string
                    enum:
                      - auth
                      - body
                      - daily
                      - nutrition
                      - sleep
                      - activity
                      - menstruation
                  sync_type:
                    type: string
                    enum:
                      - historical
                      - realtime
                  provider:
                    type: string
                    enum:
                      - GARMIN
                      - APPLE
                      - OURA
                      - FITBIT
                      - WHOOP
                  status:
                    type: string
                    enum:
                      - pending
                      - syncing
                      - uploaded
                      - failed
                      - uploading
                      - calculating
                      - calculated
                  updated_at:
                    type: string
                    format: date-time
    ValidationError:
      type: object
      title: ValidationError
      required:
        - error
      properties:
        error:
          type: string
          minLength: 1
      additionalProperties: false
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth bearer token for Health API authentication

````