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

# List greetings

> Returns a list of greetings.

**Required scopes:** `greetings:ro`


## OpenAPI

````yaml /api/configuration/v3.6/openapi.json post /action/list_greetings
openapi: 3.1.0
info:
  title: Configuration API
  version: v3.6
servers:
  - url: https://api.livechatinc.com/v3.6/configuration
security:
  - PersonalAccessToken: []
  - OAuth2BearerToken: []
paths:
  /action/list_greetings:
    post:
      tags:
        - Greetings
      summary: List greetings
      description: Returns a list of greetings.
      operationId: list-greetings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListGreetingsRequest'
            example:
              groups:
                - 0
                - 1
              limit: 25
      responses:
        '200':
          description: A list of greetings.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListGreetingsResponse'
              example:
                greetings:
                  - id: 123
                    type: normal
                    active: true
                    name: Welcome greeting
                    group: 0
                    rules:
                      - condition: and
                        type: visit_time_site
                        operator: greater_than
                        value: '10'
                    properties:
                      text: Hello! How can I help you today?
                    rich_message:
                      elements:
                        - title: Welcome!
                          subtitle: How can we help you today?
                          buttons:
                            - text: Get Support
                              type: message
                              value: I need support
                              postback_id: support_request
                              button_id: 20ff0b3f-fbed-49f4-b13f-788c9ec66f03
                found_greetings: 1
components:
  schemas:
    ListGreetingsRequest:
      type: object
      properties:
        groups:
          type: array
          items:
            type: integer
          description: >-
            An array of group IDs to filter greetings. Defaults to all
            accessible groups. Cannot be used with `page_id`.
        page_id:
          type: string
          description: >-
            The page ID for pagination. When provided, `groups` and `limit`
            parameters are ignored as they are encoded in the page ID. Cannot be
            used with `groups` or `limit`.
        limit:
          type: integer
          maximum: 100
          description: The number of greetings per page. Cannot be used with `page_id`.
          default: 100
    ListGreetingsResponse:
      type: object
      properties:
        greetings:
          type: array
          items:
            $ref: '#/components/schemas/Greeting'
          description: An array of greeting objects.
        found_greetings:
          type: integer
          description: The total number of greetings.
        next_page_id:
          type: string
          description: >-
            The page ID for the next page of results. Returned only if more
            results are available.
    Greeting:
      type: object
      properties:
        id:
          type: integer
          description: The greeting ID.
        type:
          type: string
          enum:
            - normal
            - announcement
          description: |-
            The greeting type.

            - `normal` — displayed on every visit.
            - `announcement` — displayed once per visitor.
        active:
          type: boolean
          description: True when the greeting is active.
        active_from:
          type: string
          format: date-time
          description: The ISO 8601 date-time when the greeting becomes active (if set).
        active_until:
          type: string
          format: date-time
          description: >-
            The ISO 8601 date-time when the greeting stops being active (if
            set).
        name:
          type: string
          description: The greeting name.
        group:
          type: integer
          description: The ID of the group the greeting is assigned to.
          nullable: true
        rules:
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/GreetingRule'
          description: >-
            An array of rule objects that define when the greeting should be
            triggered.
        properties:
          type: object
          additionalProperties:
            type: string
          description: The additional properties for the greeting as key-value pairs.
        rich_message:
          $ref: '#/components/schemas/RichMessage'
          description: The rich message content of the greeting.
    GreetingRule:
      type: object
      required:
        - condition
        - type
      properties:
        condition:
          type: string
          enum:
            - and
            - or
          description: |-
            The logical condition for the rule.

            - `and` — match all conditions.
            - `or` — match one of the conditions.
        type:
          type: string
          enum:
            - visit_time_site
            - visit_time_page
            - url_current
            - url_visited
            - url_funnel
            - pages_view_number
            - url_referrer
            - geolocation
            - visits_number
            - search_keyword
            - custom_variable
            - ads_traffic
            - url_match_page_view_number
          description: >-
            The type of the rule condition.


            - `visit_time_site` — seconds spent on the entire website; requires
            `value` and `operator`.

            - `visit_time_page` — seconds spent on the current page; requires
            `value` and `operator`.

            - `url_current` — current page URL to match; requires `value` and
            `operator`.

            - `url_visited` — previously visited URL to match; requires `value`
            and `operator`.

            - `url_funnel` — a sequence of URLs; requires `urls`.

            - `pages_view_number` — number of pages viewed; requires `value` and
            `operator`.

            - `url_referrer` — referrer URL to match; requires `value` and
            `operator`.

            - `geolocation` — geographic location to match; requires `value` and
            `operator`.

            - `visits_number` — number of visits; requires `value` and
            `operator`.

            - `search_keyword` — search keyword to match; requires `value` and
            `operator`.

            - `custom_variable` — session field key-value pair; requires
            `session_field`.

            - `ads_traffic` — ad platform session field; requires
            `session_field`.

            - `url_match_page_view_number` — page view count for matched URLs;
            requires `value`, `operator`, and `urls`.
        operator:
          type: string
          enum:
            - equals
            - doesnt_equal
            - lower_than
            - lower_or_equal
            - greater_than
            - greater_or_equal
            - contains
            - doesnt_contain
          description: >-
            The comparison operator for the rule. Not required for `url_funnel`,
            `custom_variable`, and `ads_traffic` types.
        value:
          type: string
          description: >-
            The value to compare against, based on the selected `operator`.
            Required for most rule types.
        urls:
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/GreetingRuleUrl'
          description: >-
            An array of URL objects. Required only for the `url_funnel` and
            `url_match_page_view_number` types objects.
        session_field:
          type: object
          additionalProperties:
            type: string
          description: >-
            The key-value pairs. Required for `custom_variable` and
            `ads_traffic` types — exactly one element.
    RichMessage:
      type: object
      required:
        - template_id
      properties:
        template_id:
          type: string
          enum:
            - cards
            - sticker
            - quick_replies
          description: >-
            The template ID that defines how every rich message will be
            presented.
        elements:
          type: array
          maxItems: 10
          items:
            $ref: '#/components/schemas/RichMessageElement'
          description: The rich message elements element objects.
    GreetingRuleUrl:
      type: object
      required:
        - url
        - operator
      properties:
        url:
          type: string
          description: >-
            The URL for the `url_funnel` and `url_match_page_view_number` rules.
            Required when the `urls` array is used.
        operator:
          type: string
          enum:
            - equals
            - doesnt_equal
            - lower_than
            - lower_or_equal
            - greater_than
            - greater_or_equal
            - contains
            - doesnt_contain
          description: >-
            The operator for the URL comparison. Required when the `urls` array
            is used.
    RichMessageElement:
      type: object
      required:
        - title
        - subtitle
        - image
      properties:
        title:
          type: string
          description: The title text displayed on the rich message.
        subtitle:
          type: string
          description: The subtitle text displayed on the rich message.
        image:
          type: object
          required:
            - url
          properties:
            url:
              type: string
              description: The image URL.
            name:
              type: string
              description: The image file name.
            content_type:
              type: string
              description: The MIME content type of the image.
            size:
              type: integer
              description: The image file size in bytes.
            width:
              type: integer
              description: The image width in pixels.
            height:
              type: integer
              description: The image height in pixels.
            alternative_text:
              type: string
              description: The alternative text for the image.
          description: The image displayed on the rich message.
        buttons:
          type: array
          maxItems: 13
          items:
            $ref: '#/components/schemas/RichMessageButton'
          description: Buttons displayed on the rich message button objects.
    RichMessageButton:
      type: object
      required:
        - text
        - type
        - value
        - postback_id
      properties:
        text:
          type: string
          description: The button text.
        type:
          type: string
          enum:
            - webview
            - message
            - url
            - phone
          description: >-
            The behavior after a user clicks the button. Should be used together
            with `value`.
        value:
          type: string
          description: >-
            The value associated with `type`. For the `webview` type, you can
            use this field to give the rich message a custom title.
        postback_id:
          type: string
          description: Unique identifier for this button, sent in postback events.
        button_id:
          type: string
          description: A button identifier. Automatically generated if not provided.
        role:
          type: string
          enum:
            - default
            - primary
            - danger
          description: The button role.
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: basic
      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>.
    OAuth2BearerToken:
      type: http
      scheme: bearer
      description: Authenticate using an OAuth 2.0 Bearer token.
      x-example: us-south1:MQraNrGCsoJvtxD7KNJQB1kM3d5

````