> ## 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.

# Select Codes

> `Limited Access - Contact us for more information`<br/><br/>Select predicted codes within the context of an interaction.<br/><Note>This endpoint is only accessible within specific customer tenants. It is not available in the public API.<br/><br/>For stateless code prediction based on input text string or documentId, please refer to the [Predict Codes](/api-reference/codes/predict-codes) API, or [contact us](https://help.corti.app) for more information.</Note>



## OpenAPI

````yaml /api-reference/auto-generated-openapi.yml put /interactions/{id}/codes/
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}/codes/:
    put:
      tags:
        - Codes (Legacy)
      summary: Select Codes
      description: >-
        `Limited Access - Contact us for more information`<br/><br/>Select
        predicted codes within the context of an interaction.<br/><Note>This
        endpoint is only accessible within specific customer tenants. It is not
        available in the public API.<br/><br/>For stateless code prediction
        based on input text string or documentId, please refer to the [Predict
        Codes](/api-reference/codes/predict-codes) API, or [contact
        us](https://help.corti.app) for more information.</Note>
      parameters:
        - $ref: '#/components/parameters/Tenant-Name'
        - $ref: '#/components/parameters/CommonInteractionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestCodesUpdate'
        required: true
      responses:
        '200':
          description: Updated list of selected codes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseCodesList'
        '400':
          description: RFC9457
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: RFC9457
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: RFC9457
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '504':
          description: RFC9457
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
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:
    RequestCodesUpdate:
      type: object
      properties:
        finalCodes:
          type: array
          description: List of final codes
          items:
            type: object
            properties:
              code:
                type: string
                description: The medical code to update
                example: W0231
              additionalCodes:
                type: array
                description: List of additional codes
                items:
                  type: string
    ResponseCodesList:
      type: object
      properties:
        codes:
          type: array
          description: List of medical codes
          items:
            type: object
            properties:
              system:
                type: string
                description: The coding system used
                example: ICD-10
              code:
                type: string
                description: The medical code
                example: T933
              description:
                type: string
                description: Description of the medical code
              state:
                $ref: '#/components/schemas/CodesState'
                type: object
                description: State of the code
              additionalCodes:
                type: array
                description: List of additional codes
                items:
                  type: object
                  properties:
                    subsetName:
                      type: string
                      description: Category or subset of the additional code
                      example: orsakskoder
                    code:
                      type: string
                      description: The additional code
                      example: W0231
                    description:
                      type: string
                      description: Description of the additional code
                    state:
                      $ref: '#/components/schemas/CodesState'
                      type: object
                      description: State of the additional code
        usageInfo:
          $ref: '#/components/schemas/CommonUsageInfo'
          type: object
    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
    CodesState:
      type: object
      properties:
        isSelected:
          type: boolean
          description: Indicates whether the code is selected
        source:
          $ref: '#/components/schemas/CommonSourceEnum'
          description: Source of the predicted code
    CommonUsageInfo:
      type: object
      description: Credits consumed for this request.
      required:
        - creditsConsumed
      properties:
        creditsConsumed:
          type: number
    CommonSourceEnum:
      type: string
      enum:
        - core
        - system
        - user
  securitySchemes:
    AuthorizationHeader:
      type: http
      description: Input your token
      scheme: bearer

````