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

# Set customer session fields

> User agent and referrer are updated by default using the browser's headers.



## OpenAPI

````yaml /api/customer-chat/v3.7/openapi.json post /action/set_customer_session_fields
openapi: 3.1.0
info:
  title: Customer Chat API
  version: '3.7'
servers:
  - url: https://api.livechatinc.com/v3.7/customer
security:
  - CustomerBearerToken: []
tags:
  - name: Chats
  - name: Configuration
  - name: Events
  - name: Localization
  - name: Properties
  - name: Customers
  - name: Status
  - name: Other
paths:
  /action/set_customer_session_fields:
    post:
      tags:
        - Customers
      summary: Set customer session fields
      description: >-
        User agent and referrer are updated by default using the browser's
        headers.
      operationId: set-customer-session-fields
      parameters:
        - $ref: '#/components/parameters/organization_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCustomerSessionFieldsRequest'
            example:
              session_fields:
                - custom_key: custom_value
                - another_custom_key: another_custom_value
      responses:
        '200':
          description: Session fields set.
components:
  parameters:
    organization_id:
      name: organization_id
      in: query
      required: true
      schema:
        type: string
      description: Unique identifier of the organization.
  schemas:
    SetCustomerSessionFieldsRequest:
      type: object
      required:
        - session_fields
      properties:
        session_fields:
          type: array
          items:
            type: object
            additionalProperties: true
          maxItems: 100
          description: >-
            An array of custom object-enclosed key-value pairs. Respects the
            order of items.
  securitySchemes:
    CustomerBearerToken:
      type: http
      scheme: bearer
      description: >-
        Customer access token obtained from the [customer authorization
        flow](/authentication/customer-tokens).
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````