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

# Update Customer Interaction

> Set custom field values on the given customer interaction.

Custom fields must be created in your Alpharun dashboard before you can set them. This performs a partial upsert: only keys that match a **Customer interaction** custom field definition are applied; unrecognized keys are ignored.



## OpenAPI

````yaml PATCH /customer-interactions/{CUSTOMER_INTERACTION_ID}
openapi: 3.0.1
info:
  title: Alpharun API
  description: Alpharun REST API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.alpharun.com/api/v1
security:
  - bearerAuth: []
paths:
  /customer-interactions/{CUSTOMER_INTERACTION_ID}:
    patch:
      description: >-
        Set custom field values on the given customer interaction.


        Custom fields must be created in your Alpharun dashboard before you can
        set them. This performs a partial upsert: only keys that match a
        **Customer interaction** custom field definition are applied;
        unrecognized keys are ignored.
      parameters:
        - name: CUSTOMER_INTERACTION_ID
          in: path
          description: ID of the customer interaction to update
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - custom_fields
              properties:
                custom_fields:
                  type: array
                  description: >-
                    Custom field values to set on the customer interaction. Each
                    `key` must match the `field_name` of a **Customer
                    interaction** custom field defined in your Alpharun
                    dashboard.
                  items:
                    type: object
                    required:
                      - key
                      - value
                    properties:
                      key:
                        type: string
                        description: >-
                          The `field_name` of the customer interaction custom
                          field to set.
                      value:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                        nullable: true
                        description: Value to set for the custom field.
            example:
              custom_fields:
                - key: priority
                  value: high
      responses:
        '200':
          description: Customer interaction updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      customer_interaction:
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            description: ID of the customer interaction
                          custom_fields:
                            type: array
                            nullable: true
                            description: >-
                              The customer interaction's custom fields after the
                              update. `null` when the customer interaction has
                              no custom field values set.
                            items:
                              type: object
                              required:
                                - key
                                - name
                                - type
                                - value
                              properties:
                                key:
                                  type: string
                                  description: Machine-readable key of the custom field
                                name:
                                  type: string
                                  description: Human-friendly name of the custom field
                                type:
                                  type: string
                                  enum:
                                    - text
                                    - date_and_time
                                    - number
                                    - boolean
                                  description: Data type of the custom field
                                value:
                                  oneOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                                  nullable: true
                                  description: Value of the custom field
              example:
                data:
                  customer_interaction:
                    id: abc123
                    custom_fields:
                      - key: priority
                        name: Priority
                        type: text
                        value: high
        '400':
          description: Bad request (invalid payload)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Customer interaction not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````