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

# Get customer

> Returns the info about the customer with a given `id`.

**Required scopes:** `customers:ro`


## OpenAPI

````yaml /api/agent-chat/v3.7/openapi.json post /action/get_customer
openapi: 3.0.0
info:
  title: Agent Chat API
  description: >-
    The Agent Chat API allows you to manage chats, threads, events, and agent
    state.
  version: '3.7'
servers:
  - url: https://api.livechatinc.com/v3.7/agent
    description: Production server
security: []
paths:
  /action/get_customer:
    post:
      tags:
        - Customers
      summary: Get customer
      description: Returns the info about the customer with a given `id`.
      operationId: get-customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetCustomerRequest'
            example:
              id: b7eff798-f8df-4364-8059-649c35c9ed0c
      responses:
        '200':
          description: >-
            Returns the [customer
            object](/api/agent-chat/v3.7/data-structures#customer).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
              example:
                id: b7eff798-f8df-4364-8059-649c35c9ed0c
                type: customer
                created_at: '2026-06-11T15:19:21.010200Z'
                name: Thomas Anderson
                email: t.anderson@example.com
                avatar: example.com/avatars/1.jpg
                session_fields:
                  - custom_key: custom_value
                  - another_custom_key: another_custom_value
                visit:
                  started_at: '2026-06-12T15:19:21.010200Z'
                  ended_at: '2026-06-12T15:20:22.010200Z'
                  referrer: http://www.google.com/
                  ip: <customer_ip>
                  user_agent: >-
                    Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)
                    AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116
                    Safari/537.36
                  geolocation:
                    latitude: '-14.6973803'
                    longitude: '-75.1266898'
                    country: Poland
                    country_code: PL
                    region: Dolnoslaskie
                    city: Wroclaw
                    timezone: Europe/Warsaw
                  last_pages:
                    - opened_at: '2026-06-12T15:19:21.010200Z'
                      url: https://www.text.com/
                      title: Text - Homepage
                    - opened_at: '2026-06-12T15:19:21.010200Z'
                      url: https://www.text.com/features/ai-agent/
                      title: Text - AI Agents
                statistics:
                  chats_count: 3
                  threads_count: 9
                  visits_count: 5
                  page_views_count: 1337
                  greetings_shown_count: 69
                  greetings_accepted_count: 42
                  tickets_count: 12
                agent_last_event_created_at: '2026-06-12T15:19:21.010200Z'
                customer_last_event_created_at: '2026-06-12T15:19:21.010200Z'
                chat_ids:
                  - PWJ8Y4THAV
                tickets:
                  - ticket_id: 0c04cb99-817a-4935-9d62-137c89a74388
                    created_at: '2026-06-12T15:19:21.010200Z'
      security:
        - PersonalAccessToken: []
        - OAuth2BearerToken:
            - customers:ro
components:
  schemas:
    GetCustomerRequest:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The customer ID.
    Customer:
      type: object
      properties:
        id:
          type: string
          description: The customer ID.
        type:
          type: string
          description: The customer type. Always `customer`.
        name:
          type: string
          description: The customer's name. Returned only if set.
        email:
          type: string
          description: The customer's email. Returned only if set.
        avatar:
          type: string
          description: The customer's avatar. Returned only if set.
        phone_number:
          type: string
          description: The customer's phone number. Returned only if set.
        created_at:
          type: string
          description: The date and time when the customer's identity was created.
        session_fields:
          type: array
          items:
            type: object
          description: >-
            An array of custom object-enclosed key-value pairs. Returned only if
            set. Available for the session duration.
        statistics:
          type: object
          description: Counters for started threads, opened pages, etc.
        visit:
          type: object
          description: >-
            Geolocation and opened pages from the customer's most recent online
            visit. Returned only if the customer logged in at least once.
        chat_ids:
          type: array
          items:
            type: string
          description: >-
            The IDs of the customer's chats. Returned only if the customer had
            at least one chat.
        omnichannel:
          type: object
          description: The customer's omnichannel data.
        address:
          type: object
          description: The customer's address data. Returned only if set.
        customer_properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/CustomerProperty'
          description: >-
            An object where the keys are the IDs of the customer's properties
            and the values are their data.
        agent_last_event_created_at:
          type: string
          description: >-
            The date and time of the last event created by an agent in this
            customer's chats.
        customer_last_event_created_at:
          type: string
          description: The date and time of the last event created by the customer.
    CustomerProperty:
      type: object
      required:
        - value
        - last_updated_at
      properties:
        value:
          description: >-
            The current value of the property. Its type is determined by the
            property definition's `CustomerPropertyType`.
        last_updated_at:
          type: string
          description: The RFC 3339 datetime the value was last updated.
        last_updated_agent_account_id:
          type: string
          description: The account ID of the agent that last set this value.
        last_updated_agent_client_id:
          type: string
          description: The client ID of the application that last set this value.
  securitySchemes:
    PersonalAccessToken:
      description: >-
        Use your `account ID` as the username and your personal access token
        (PAT) as the password, or pass a Base64-encoded value directly in the
        Authorization header. For more information, see the <a
        href="/authentication/personal-access-tokens">personal access tokens
        guide</a>.
      type: http
      scheme: basic
    OAuth2BearerToken:
      description: >-
        This API uses OAuth2 with the implicit grant flow. <a
        href="/authentication/oauth-authorization#implicit-grant">Learn about
        the implicit grant flow.</a>
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com
          scopes:
            chats--all:ro: Read all chats
            chats--all:rw: Read and write all chats
            chats--access:ro: Read chats from groups the agent is a member of
            chats--access:rw: Read and write chats from groups the agent is a member of
        authorizationCode:
          authorizationUrl: https://accounts.livechat.com
          tokenUrl: https://accounts.livechat.com/token
          scopes:
            chats--all:ro: Read all chats
            chats--all:rw: Read and write all chats
            chats--access:ro: Read chats from groups the agent is a member of
            chats--access:rw: Read and write chats from groups the agent is a member of

````