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

# Update Patient

> Update a specific patient given his unique ID.



## OpenAPI

````yaml PUT /patients/{id}
openapi: 3.1.0
info:
  title: IOLOKIS API
  description: You can use the REST API to manage your IOLOKIS account and resources.
  version: 1.0.0
servers:
  - url: https://api.iolokis.com
security:
  - bearerAuth: []
paths:
  /patients/{id}:
    put:
      description: Update a specific patient given his unique ID.
      parameters:
        - name: id
          in: path
          description: Patient ID to update. This is the unique ID of the patient.
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: >-
          All fields are optional. Feel free to include only the fields you want
          to update.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePatient'
      responses:
        '200':
          description: Patient updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdatePatientResponse'
        '400':
          description: Invalid input.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing JWT token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdatePatient:
      type: object
      properties:
        first_name:
          type: string
        last_name:
          type: string
        age:
          type: integer
        gender:
          type: string
        dirPath:
          type: array
          items:
            type: string
        phone_number:
          type: string
        workspace_id:
          type: integer
    UpdatePatientResponse:
      type: object
      required:
        - patientId
        - message
      properties:
        patientId:
          type: string
          format: uuid
        message:
          type: string
          description: Patient updated successfully.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message indicating the error
      required:
        - error
    UnauthorizedError:
      type: object
      properties:
        message:
          type: string
          description: Error message indicating missing authorization header
      required:
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````