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

# Update Interaction

> Modifies an existing interaction by updating specific fields without overwriting the entire record.



## OpenAPI

````yaml /api-reference/auto-generated-openapi.yml patch /interactions/{id}
openapi: 3.0.0
info:
  title: Corti API
  version: 2.0.0
servers:
  - url: https://api.{environment}.corti.app/v2/
    variables:
      environment:
        default: eu
        enum:
          - us
          - eu
security:
  - AuthorizationHeader:
      - bearer
tags:
  - name: Interactions
  - name: Facts
  - name: Documents
  - name: Codes
  - name: Recordings
  - name: Transcripts
  - name: Languages
paths:
  /interactions/{id}:
    patch:
      tags:
        - Interactions
      summary: Update Interaction
      description: >-
        Modifies an existing interaction by updating specific fields without
        overwriting the entire record.
      operationId: interactions_update
      parameters:
        - $ref: '#/components/parameters/Tenant-Name'
        - $ref: '#/components/parameters/CommonInteractionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InteractionsUpdateRequest'
        required: true
      responses:
        '200':
          description: >-
            A request body containing the fields to update within the
            interaction.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InteractionsGetResponse'
        '403':
          description: RFC9457
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '504':
          description: RFC9457
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: csharp
          label: C# .NET SDK
          source: |
            using Corti;

            var client = new CortiClient(
                "TENANT_NAME",
                CortiClientEnvironment.Eu,
                new CortiClientAuth.ClientCredentials("client_id", "client_secret")
            );
            await client.Interactions.UpdateAsync(
                "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                new InteractionsUpdateRequest()
            );
        - lang: javascript
          label: JavaScript SDK
          source: >
            import { CortiClient, CortiEnvironment } from "@corti/sdk";


            const client = new CortiClient({
                environment: CortiEnvironment.Eu,
                auth: {
                    clientId: "YOUR_CLIENT_ID",
                    clientSecret: "YOUR_CLIENT_SECRET"
                },
                tenantName: "YOUR_TENANT_NAME"
            });

            await
            client.interactions.update("f47ac10b-58cc-4372-a567-0e02b2c3d479");
components:
  parameters:
    Tenant-Name:
      name: Tenant-Name
      in: header
      description: >-
        Identifies a distinct entity within Corti's multi-tenant system. Ensures
        correct routing and authentication of the request.
      required: true
      example: base
      schema:
        type: string
        description: >-
          Identifies a distinct entity within Corti's multi-tenant system.
          Ensures correct routing and authentication of the request.
        example: base
    CommonInteractionId:
      name: id
      in: path
      description: The unique identifier of the interaction. Must be a valid UUID.
      required: true
      schema:
        $ref: '#/components/schemas/UUID'
  schemas:
    InteractionsUpdateRequest:
      type: object
      properties:
        assignedUserId:
          $ref: '#/components/schemas/UUID'
          type: string
          format: uuid
          description: >-
            The unique identifier of the medical professional responsible for
            this interaction.  If nulled, automatically set to a uuid.
          items: {}
        encounter:
          $ref: '#/components/schemas/InteractionsEncounterUpdateRequest'
          type: object
          description: Details of the encounter being updated.
        patient:
          $ref: '#/components/schemas/InteractionsPatient'
          type: object
          description: Patient-related updates.
    InteractionsGetResponse:
      type: object
      required:
        - id
        - assignedUserId
        - encounter
        - patient
        - createdAt
        - updatedAt
        - lastUpdated
        - websocketUrl
      properties:
        id:
          $ref: '#/components/schemas/UUID'
          type: string
          format: uuid
          description: Unique identifier for the interaction.
          items: {}
        assignedUserId:
          $ref: '#/components/schemas/UUID'
          type: string
          format: uuid
          description: >-
            A unique identifier for the medical professional responsible for
            this interaction. If nulled, automatically set to a uuid.
          items: {}
        encounter:
          $ref: '#/components/schemas/InteractionsEncounterResponse'
          type: object
          description: Information about the encounter, including type, status, and timing.
        patient:
          $ref: '#/components/schemas/InteractionsPatient'
          type: object
          description: >-
            Details about the patient involved in the interaction, if
            applicable.
        endedAt:
          type: string
          format: date-time
          description: The timestamp when the interaction concluded (UTC).
          nullable: true
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the interaction was started (UTC).
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the interaction was last modified (UTC).
        websocketUrl:
          type: string
          description: >-
            WebSocket URL for streaming real-time interactions. Append a token
            in the format: /interactions/{interactionID}/streams?token=Bearer
            token-value-here
        lastUpdated:
          type: string
          format: date-time
          description: >-
            The timestamp indicating the last recorded update for this
            interaction.
    ErrorResponse:
      type: object
      required:
        - requestid
        - status
        - type
        - detail
      properties:
        requestid:
          type: string
        status:
          type: integer
        type:
          type: string
        detail:
          type: string
        validationErrors:
          type: array
          items:
            type: object
            additionalProperties:
              type: string
    UUID:
      type: string
      items: {}
      format: uuid
      example: f47ac10b-58cc-4372-a567-0e02b2c3d479
    InteractionsEncounterUpdateRequest:
      type: object
      properties:
        identifier:
          type: string
          description: >-
            A unique identifier for the encounter, essential for tracking and
            referencing specific patient interactions.
        status:
          $ref: '#/components/schemas/InteractionsEncounterStatusEnum'
          description: >-
            Indicates the current state of the encounter, crucial for
            understanding the progression and current state of care.
        type:
          $ref: '#/components/schemas/InteractionsEncounterTypeEnum'
          description: >-
            The specific type of encounter, providing context about the nature
            and setting of the patient interaction.
        period:
          $ref: '#/components/schemas/InteractionsEncounterPeriod'
          type: object
          description: The time period during which the encounter takes place.
        title:
          type: string
          description: A readable name for the interaction
          nullable: true
    InteractionsPatient:
      type: object
      required:
        - identifier
      properties:
        identifier:
          type: string
          description: FHIR reference to patient identifier.
        name:
          type: string
          description: FHIR reference to Text representation of the full name.
          nullable: true
        gender:
          $ref: '#/components/schemas/InteractionsGenderEnum'
          description: FHIR reference to patient gender.
          nullable: true
        birthDate:
          type: string
          format: date-time
          description: FHIR reference to patient birth date.
          nullable: true
        pronouns:
          type: string
          description: FHIR reference to patient extension Individual Pronouns.
          nullable: true
    InteractionsEncounterResponse:
      type: object
      required:
        - identifier
        - status
        - type
        - period
      properties:
        identifier:
          type: string
          description: >-
            A unique identifier for the encounter, essential for tracking and
            referencing specific patient interactions.
        status:
          $ref: '#/components/schemas/InteractionsEncounterStatusEnum'
          description: >-
            Indicates the current state of the encounter, crucial for
            understanding the progression and current state of care.
        type:
          $ref: '#/components/schemas/InteractionsEncounterTypeEnum'
          description: >-
            The specific type of encounter, providing context about the nature
            and setting of the patient interaction.
        period:
          $ref: '#/components/schemas/InteractionsEncounterPeriod'
          type: object
          description: The time period during which the encounter takes place.
        title:
          type: string
          description: A readable name for the interaction
          nullable: true
    InteractionsEncounterStatusEnum:
      type: string
      enum:
        - planned
        - in-progress
        - on-hold
        - completed
        - cancelled
        - deleted
    InteractionsEncounterTypeEnum:
      type: string
      enum:
        - first_consultation
        - consultation
        - emergency
        - inpatient
        - outpatient
    InteractionsEncounterPeriod:
      type: object
      required:
        - startedAt
      properties:
        startedAt:
          type: string
          format: date-time
          description: The start date/time of the encounter. (UTC)
        endedAt:
          type: string
          format: date-time
          description: The end date/time of the encounter. (UTC)
          nullable: true
    InteractionsGenderEnum:
      type: string
      enum:
        - male
        - female
        - unknown
        - other
  securitySchemes:
    AuthorizationHeader:
      type: http
      description: Input your token
      scheme: bearer

````