> ## Documentation Index
> Fetch the complete documentation index at: https://ekacare-mintlify-efa94f7d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Eka User

> ### Overview
Update an existing Eka User. Only the fields included in the request body will be updated; all fields are optional.

**Endpoint:** `{{HOST}}/cdr/v1/ekauser/{user_id}/`

**Method:** `PATCH`

### Path Parameters

| Parameter | Type   | Description       | Required |
| --------- | ------ | ----------------- | -------- |
| user_id   | string | Eka User's Eka ID | Yes      |



## OpenAPI

````yaml patch /cdr/v1/ekauser/{user_id}/
openapi: 3.0.0
info:
  title: Ekacare API & Webhook Documentation
  contact: {}
  version: '1.0'
servers:
  - description: Production
    url: https://api.eka.care
  - description: Stage/Sandbox
    url: https://api.dev.eka.care
security: []
paths:
  /cdr/v1/ekauser/{user_id}/:
    patch:
      tags:
        - HIP Users API
      summary: Update Eka User
      description: >-
        ### Overview

        Update an existing Eka User. Only the fields included in the request
        body will be updated; all fields are optional.


        **Endpoint:** `{{HOST}}/cdr/v1/ekauser/{user_id}/`


        **Method:** `PATCH`


        ### Path Parameters


        | Parameter | Type   | Description       | Required |

        | --------- | ------ | ----------------- | -------- |

        | user_id   | string | Eka User's Eka ID | Yes      |
      operationId: UpdateEkaUser
      parameters:
        - name: auth
          in: header
          description: >-
            The auth token of the business. It is used to authenticate the
            client. This should be fetched from auth api.
          required: true
          style: simple
          schema:
            type: string
            example: >-
              eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJiX2lkIjoiMTIzNDU2IiwiY2xpZW50X2lkIjoiNzg5MCIsImV4dHJhX2ZpZWxkIjoiZXh0cmFfZmllbGRfZGF0YSJ9.q9KzBI6f4l3OyM_EkB5Quq0l9EEMFh5JS-fx3F_PHUM
        - name: user_id
          in: path
          description: Eka User's Eka ID
          required: true
          style: simple
          schema:
            type: string
            example: '176917697553584'
      requestBody:
        description: Fields to update on the Eka User. All fields are optional.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                firstname:
                  type: string
                  example: Amit
                lastname:
                  type: string
                  example: Kumar
                mobile:
                  type: string
                  example: '9876543210'
                email:
                  type: string
                  format: email
                  example: amit.kumar@example.com
                auth_userid:
                  type: string
                  example: Prateek_@_123
                gender:
                  type: string
                  enum:
                    - M
                    - F
                    - O
                  example: M
                dob:
                  type: string
                  format: date
                  example: '1990-05-15'
                is_admin:
                  type: boolean
                  example: true
                seat_type:
                  type: string
                  enum:
                    - b
                    - p
                  example: p
                persona:
                  type: string
                  enum:
                    - S
                    - D
                  example: D
                doctor_ids:
                  type: array
                  items:
                    type: string
                  example:
                    - do1769174683513
                partner_doctor_ids:
                  type: array
                  items:
                    type: string
                  example:
                    - Part_doc_1
                clinic_ids:
                  type: array
                  items:
                    type: string
                  example:
                    - c-ab2c-34f2d-2gwd-2g2g
                partner_clinic_ids:
                  type: array
                  items:
                    type: string
                  example:
                    - Part_clinic_1
                partner_id:
                  type: string
                  example: Part_user_1
            example:
              is_admin: true
              seat_type: p
              clinic_ids:
                - c-ab2c-34f2d-2gwd-2g2g
      responses:
        '200':
          description: OK - Eka User updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  ekaid:
                    type: string
                    example: '176917697553584'
        '400':
          description: Bad Request - Validation failed or user_id missing
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: EkaUser ID is required for PATCH
        '404':
          description: Eka User not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: error
                  message:
                    type: string
                    example: EkaUser not found

````