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

# Update customer

> Updates customer's fields. Allows clearing the values of `name`, `email`, and `address` components by providing an empty string as the new field value.



## OpenAPI

````yaml /api/customer-chat/v3.7/openapi.json post /action/update_customer
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/update_customer:
    post:
      tags:
        - Customers
      summary: Update customer
      description: >-
        Updates customer's fields. Allows clearing the values of `name`,
        `email`, and `address` components by providing an empty string as the
        new field value.
      operationId: update-customer
      parameters:
        - $ref: '#/components/parameters/organization_id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomerRequest'
            example:
              name: Thomas Anderson
              email: t.anderson@example.com
              avatar: https://example.com/avatars/1.png
              session_fields:
                - custom_key: custom_value
                - another_custom_key: another_custom_value
      responses:
        '200':
          description: Customer updated.
components:
  parameters:
    organization_id:
      name: organization_id
      in: query
      required: true
      schema:
        type: string
      description: Unique identifier of the organization.
  schemas:
    UpdateCustomerRequest:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        avatar:
          type: string
          description: The URL of the customer's avatar.
        session_fields:
          type: array
          items:
            type: object
            additionalProperties: true
          description: >-
            An array of custom object-enclosed key-value pairs. Respects the
            order of items.
        omnichannel:
          type: object
          properties:
            fbmessenger:
              type: object
              properties:
                id:
                  type: string
                name:
                  type: string
                first_name:
                  type: string
                last_name:
                  type: string
                profile_pic:
                  type: string
                gender:
                  type: string
                locale:
                  type: string
                is_verified_user:
                  type: boolean
              required:
                - id
            twilio:
              type: object
              properties:
                phone_number:
                  type: string
              required:
                - phone_number
            whatsapp:
              type: object
              properties:
                id:
                  type: string
                  description: >-
                    The WhatsApp ID. Required when `omnichannel.whatsapp` is
                    provided.
                name:
                  type: string
                  description: The WhatsApp display name.
                phone_number:
                  type: string
                  description: >-
                    The WhatsApp phone number, in E.164 format. Required when
                    `omnichannel.whatsapp` is provided.
        address:
          type: object
          description: The customer's address.
          properties:
            address:
              type: string
              description: The street address.
            city:
              type: string
              description: The city name.
            country:
              type: string
              description: The country name.
            state:
              type: string
              description: The state name.
            postal_code:
              type: string
              description: The postal code.
  securitySchemes:
    CustomerBearerToken:
      type: http
      scheme: bearer
      description: >-
        Customer access token obtained from the [customer authorization
        flow](/authentication/customer-tokens).
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````